-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add filter pushdown scatter threshold #9414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Dandandan
wants to merge
17
commits into
apache:main
Choose a base branch
from
Dandandan:selectivity_threshold
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+268
−19
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
41e7bcb
Use per-predicate projection masks in ClickBench benchmark
Dandandan 8d7533b
Add statistics-based page pruning to ClickBench benchmark
Dandandan 15142b6
Reorder Q22 predicates by selectivity for ClickBench benchmark
Dandandan 498160e
[Test] Filter selectivity
Dandandan 907f82d
[Test] Filter selectivity
Dandandan b4275cb
[Test] Filter selectivity
Dandandan 06954d5
Merge branch 'main' into selectivity_threshold
Dandandan 4581a1f
Merge branch 'main' into selectivity_threshold
Dandandan 155a1fc
Improve selectivity threshold: measure absolute selectivity and avoid…
Dandandan 75073e1
Revert selectivity to measure against raw (relative) counts
Dandandan 5f2be6e
Replace selectivity threshold with scatter-based filter deferral
Dandandan a9bc94f
Use selector density (selectors/rows) for scatter threshold
Dandandan a1e52a3
Add cached row_count to RowSelection and O(1) total_row_count()
Dandandan 7e7e065
Pass row_count to with_predicate instead of caching in RowSelection
Dandandan 9cc2660
Use scatter density threshold of 0.01 and remove debug prints
Dandandan 070fb5a
Only defer predicates that increase fragmentation
Dandandan 0da100d
Fmt
Dandandan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this even more now! This is now dealing with selector density, something that would be hard to do on the datafusion side and is correlated but not equivalent to overall filter selectivity, which I think is what probably ends up mattering more for coarser IO patterns and such given object store range coalescing, pages, etc.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I also think this is quite a bit better - I think it's OK if a filter "only" selects 50% of the rows, if it is nicely packed that will probably be able to skip almost 50% of the pages and lead to efficient IO and decoding.
But (especially when combining multiple filters), chances are the filter gets too fragmented, a 50% packed one is better than a 25% selective one that just does select 1 / skip 1 / select 1 and will do the same amount of IO and having horrible decoding performance.
I think you could go even go further and check which combination of filtera are giving the best of both worlds (selectivity and fragmentation)