feat: Vectorize aggregating Statistics#20768
Open
jonathanc-n wants to merge 3 commits intoapache:mainfrom
Open
feat: Vectorize aggregating Statistics#20768jonathanc-n wants to merge 3 commits intoapache:mainfrom
Statistics#20768jonathanc-n wants to merge 3 commits intoapache:mainfrom
Conversation
jonathanc-n
commented
Mar 7, 2026
| /// assert_eq!(merged.column_statistics[0].sum_value, | ||
| /// Precision::Exact(ScalarValue::from(1500))); | ||
| /// ``` | ||
| pub fn try_merge(self, other: &Statistics) -> Result<Self> { |
Contributor
Author
There was a problem hiding this comment.
I think this removal should be fine since most API calls would've been through try_merge_iter, should be mentioned in the upgrade guide though.
Contributor
Author
There was a problem hiding this comment.
Had to add this instead of importing aggregate common functions because there would be circular dependency. Much of it is just duplicate code
Contributor
Author
|
I verified this has a 5x speed up for numeric primitive values using small benchmark. felt unnecssary to add the benchmark since it is jsut a regular vectorization optimization |
Dandandan
reviewed
Mar 7, 2026
| } | ||
| } | ||
|
|
||
| /// Compute the sum of a collection of [`ScalarValue`]s using vectorized |
Contributor
There was a problem hiding this comment.
Is this really faster than directly summing the primitives values out of the scalarvalues (without creating scalarvalue)?
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
What changes are included in this PR?
Vectorize aggregations for combining statistics by gathering all values then calling kernels once
Are these changes tested?
Unit tests + existing tests
Are there any user-facing changes?
Removed
merge_iter