-
Notifications
You must be signed in to change notification settings - Fork 803
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
Adaptive Parquet Predicate Pushdown #5523
Comments
take |
I'll take a look at this. Here are some of my plans:
Some more context: |
An important goal of this ticket, mentioned by @tustvold in #6454 (comment), is that evaluating predicates in If we are able to achieve this goal, it would mean that query engines like DataFusion could push all predicates down into the predicate reader always. At the moment, since it sometimes faster to apply filters after reading columns than it is via When it makes sense to push predicates down depends on their actual selectivity, which is only known for sure during evaluation Thus, I agree with the conclusion that implementing adaptivity in the lowest level scan will achieve the goal |
This is an excellent summary of the goal, it also aligns well with my current project. Since I have gone quite far on this, I want to share some of the issues I have encountered:
|
There is a structure in datafusion for Coalescing which might help / provide inspiration / be good to port upstream: https://github.com/apache/datafusion/blob/c22abb4ac3f1af8bbdf176ef0198988fc7b0982c/datafusion/physical-plan/src/coalesce/mod.rs#L71 |
I think this is what @tustvold mentioned with the |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Currently
RowSelection
stores a list ofRowSelector
. This is optimised for the case of large runs of skipped or selected rows, allowing this to be pushed down to the underlying decoding machinery. Whilst this works very well for the use-case of skipping data based on the page index, where the selections are necessarily in the thousands of rows, it will potentially degrade in the presence of more granular predicate evaluation, e.g. as performed byArrowPredicate
.Describe the solution you'd like
In a similar vein to #1248, we should have different strategies based on the selectivity of the predicate. In particular I would like RowSelection to switch between a
RowSelector
approach that is pushed down to the underlying readers, and a late evaluation approach where it stores aBooleanBuffer
that is applied to the columns after the factDescribe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: