[Minor] Use per-predicate projection masks in arrow_reader_clickbench benchmark#9413
Merged
Dandandan merged 2 commits intoapache:mainfrom Feb 15, 2026
Merged
Conversation
Contributor
Author
|
run benchmark arrow_reader_clickbench |
|
🤖 |
Previously, every predicate in the RowFilter received the same ProjectionMask containing ALL filter columns. This caused unnecessary decoding of expensive string columns when evaluating cheap integer predicates. Now each predicate receives a mask with only the single column it needs. Key sync improvements (vs baseline): - Q37: 63.7ms -> 7.3ms (-88.6%, Title LIKE with CounterID=62 filter) - Q36: 117ms -> 24ms (-79.5%, URL <> '' with CounterID=62 filter) - Q40: 17.9ms -> 5.1ms (-71.5%, multi-pred with RefererHash eq) - Q41: 17.3ms -> 5.5ms (-68.1%, multi-pred with URLHash eq) - Q22: 303ms -> 127ms (-58.2%, 3 string predicates) - Q42: 7.6ms -> 3.9ms (-48.5%, int-only multi-predicate) - Q38: 19.1ms -> 12.4ms (-34.9%, 5 int predicates) - Q21: 159ms -> 98ms (-38.5%, URL LIKE + SearchPhrase) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27f9aba to
41e7bcb
Compare
|
🤖: Benchmark completed Details
|
alamb
approved these changes
Feb 15, 2026
Contributor
alamb
left a comment
There was a problem hiding this comment.
Makes sense to me -- thanks @Dandandan
| /// | ||
| /// Note that since `RowFilter` does not implement Clone, we need to create | ||
| /// the filter for each row | ||
| /// Each predicate gets a ProjectionMask containing only the single column |
Contributor
Author
|
Thanks for the review @alamb |
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?
Rationale for this change
As suggested by Claude - currently it uses a projection mask for all columns, significantly slowing down queries that have multiple predicates.
This makes it more in line with consumer side (e.g. DataFusion) (so we can more accurately benchmark improvements).
It shows the perf difference in a number of (multi-filter) queries:
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?