perf(parquet): fuse consecutive filters on the same projection - #10859
Draft
haohuaijin wants to merge 2 commits into
Draft
perf(parquet): fuse consecutive filters on the same projection#10859haohuaijin wants to merge 2 commits into
haohuaijin wants to merge 2 commits into
Conversation
Contributor
Author
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Which issue does this PR close?
RowFilterfusion #10926, Improve performance of CachedArrayreader filter+concat #10774, and parquet: Improve performance of mask/selection construction inReadPlanBuilder::with_predicate_options#10776Rationale for this change
The push decoder evaluates each
ArrowPredicateseparately. Consecutive predicates with the same projection may therefore decode the same column repeatedly or replay it through the predicate cache.This PR evaluates eligible same-projection predicates from one decoded stream. Later predicates receive only rows accepted by earlier predicates. Intermediate results use pass-through, zero-copy slice, compaction, or early stop as appropriate.
Fusion is limited to a single top-level, non-repeated leaf projection and is disabled when a row limit is active. Other predicate shapes continue to use the existing path. The synchronous reader is unchanged.
Performance
Fusion trades repeated decoding or predicate-cache replay for survivor materialization. It can improve selective or expensive predicates, but may regress inexpensive predicates when most rows survive or survivors are fragmented.
ClickBench Q25 latency decreased from 140.379 ms to 110.727 ms (-21.12%). Across 256 three-predicate cases, geometric-mean latency decreased by 6.84%, although 33 cases regressed by more than 2%. The worst regressions occurred with early 99%-survivor predicates.
Full benchmark results: #10926 (comment)
What changes are included?
RowSelectionsemanticsTesting
RowSelectionequivalence, with and without a prior selectionUser-facing changes
None. This is an internal
RowFilteroptimization.