-
Notifications
You must be signed in to change notification settings - Fork 928
POC Adaptive predicate push down based read plan #7524
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
zhuqi-lucas
wants to merge
6
commits into
apache:main
Choose a base branch
from
zhuqi-lucas:adaptive_predicate_push_down
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.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2a9a72b
Introduce `ReadPlan` to encapsulate the calculation of what rows to d…
alamb 2271540
adaptive parquet predicate push down
zhuqi-lucas 711cf0d
Fix lint
zhuqi-lucas e7a5e38
Merge remote-tracking branch 'upstream/main' into adaptive_predicate_…
zhuqi-lucas 9f499eb
Add doc for adaptive policy
zhuqi-lucas ebf2f0f
Fix doc
zhuqi-lucas 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
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.
Since many of these read selections come from a BooleanBuffer originally (the result of evaluating a ArrowPredicate), I wonder what you think about potentially avoiding creating
RowSelection
s in the ReadPlanSomething like
And then the trick would be some sort of heuristic / adaptive approach to turn the result of the ArrowPredicate into a
DecodeRows
planarrow-rs/parquet/src/arrow/arrow_reader/mod.rs
Lines 1013 to 1017 in 7bab215
🤔
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.
Thank you @alamb for this suggestion, i was thinking use this way.
But i don't use it for this PR, because the adaptive level is batch level for this PR, for example:
We have batch size 8192, we only do the adaptive for each batch level, and the default is to use range selector, so we will be more accurate for each small level to choose:
8192(2000read 2000skip 4192 read) => keep range
8192(200read 200 skip ....200read..) avg =200 => keep range
8192(5 read 10 skip 10 skip, 5 read, 5read...) => avg < 10 so nee to change the 8192 small window to bitmap
....
So we only change for small window with default range selector to change to bitmap, it's not heavy for most cases.
The adaptive window size is the batch size, not for the total row group len.
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, what I am thinking is somehow avoid creating the pattern of
5 read 10 skip 5 read 10 skip ...
in the first place.I haven't thought through exactly how to do that
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.
Thank you @alamb for checking, i also add doc for latest PR.