-
Notifications
You must be signed in to change notification settings - Fork 915
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
Optimize quals on segmentby columns in ColumnarScan #7661
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7661 +/- ##
==========================================
+ Coverage 80.06% 81.34% +1.28%
==========================================
Files 190 242 +52
Lines 37181 44890 +7709
Branches 9450 11202 +1752
==========================================
+ Hits 29770 36518 +6748
- Misses 2997 3981 +984
+ Partials 4414 4391 -23 ☔ View full report in Codecov by Sentry. |
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.
Pretty short one, so not really any comments. You might want to use more distinctive names to make the code easier to maintain and see if you can add tests for the branches not covered.
When filtering arrow slots in ColumnarScan, quals on segmentby columns should be executed separately from those on other columns because they don't require decompression and might filter the whole arrow slot in one go. Furthermore, the quals only need to be applied once per arrow slot since the segmentby value is the same for all compressed rows in the slot. This will speed up scans when filters on segmentby columns cannot be pushed down to Hypercore TAM as scankeys. For example, "<column> IN (1, 2, 3)" won't be pushed down as a scankey because only index scans support scankeys with such scalar array expressions.
Fix a bug when backwards scanning a ColumnarScan and add a test case.
5e8e03e
to
8070393
Compare
When filtering arrow slots in ColumnarScan, quals on segmentby columns should be executed separately from those on other columns because they don't require decompression and might filter the whole arrow slot in one go. Furthermore, the quals only need to be applied once per arrow slot since the segmentby value is the same for all compressed rows in the slot.
This will speed up scans when filters on segmentby columns cannot be pushed down to Hypercore TAM as scankeys. For example, " IN (1, 2, 3)" won't be pushed down as a scankey because only index scans support scankeys with such scalar array expressions.
Disable-check: force-changelog-file
Disable-check: commit-count