-
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
Java utilities to aid in accelerating aggregations on 128-bit types #10201
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #10201 +/- ##
================================================
+ Coverage 10.42% 10.47% +0.05%
================================================
Files 119 122 +3
Lines 20603 20501 -102
================================================
Hits 2148 2148
+ Misses 18455 18353 -102
Continue to review full report at Codecov.
|
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.
This looks fine to me, but I would like someone with more C++ to review it too
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.
Just the C++ stuff.
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.
The java side and as much as I can understand of the C++
@gpucibot merge |
This adds a couple of custom kernels for Java to help accelerate sum aggregations on 128-bit types and check for overflows. The first kernel extracts a 32-bit chunk from an 128-bit type which can be used to feed four 32-bit chunks into a sum aggregation. The second kernel takes the resulting upscaled 64-bit integer results and reassembles the parts into a 128-bit type column along with a boolean column to indicate whether the value overflowed.
By splitting the 128-bit type into 32-bit chunks, a sum aggregation on DECIMAL128 which is a sort-based aggregation can be turned into a hash-based aggregation on 32-bit integer inputs for improved performance. As a bonus, this approach can also check for overflow which is difficult to do when aggregating on DECIMAL128 sums directly.