Skip to content

Add example implementing filter pushdown #21145

Description

@alamb

Is your feature request related to a problem or challenge?

@pgwhalen says on https://github.com/apache/datafusion-site/pull/161/changes#r2972139725

As someone who struggled with implementing filter pushdown in a custom table provider before, it would be helpful if there was a section with examples on actually implementing it, just to specifying that the table provider supports it. Going from filters: &[Expr] to something more useful was pretty intimidating for me as a newbie. I ended up learning about LiteralGuarantee::analyze from the pruning_predicate.rs example and that was the big unlock, but as someone not familiar with database internals terminology, it was nonobvious initially.

Describe the solution you'd like

It would be cool to add an example that shows how to use PruningPredicate and LiteralGuarantee to decide among files based on predicates, for example

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. added theissue type on Mar 25, 2026
  2. alamb commented on Mar 25, 2026

    @alamb
    ContributorAuthor
  3. alamb commented on Mar 25, 2026

    @alamb
    ContributorAuthor

    Note the example on apache/datafusion-site#161 shows the setup needed, but the idea of this example would be to show how to use pruning prediate / gaurantees to actually implement the filtering

  4. pgwhalen commented on Mar 26, 2026

    @pgwhalen
    Contributor

    I can take a crack at this one over the weekend if that's okay!

  5. alamb commented on Mar 26, 2026

    @alamb
    ContributorAuthor

    I can take a crack at this one over the weekend if that's okay!

    That would be amazing

    I think ensuring you review the existing examples would be good -- and if you can work it in to one of those great and if not a new example would be great

  6. pgwhalen commented on Mar 30, 2026

    @pgwhalen
    Contributor

    take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions