Uh oh!
There was an error while loading. Please reload this page.
fix(stats): widen sum_value integer arithmetic to SUM-compatible types - #20865
Merged
Conversation
kumarUjjawal
commented
Mar 12, 2026
ContributorAuthor
cc @jonathanc-n |
Dandandan
approved these changes
Mar 14, 2026
Dandandan
commented
Mar 14, 2026
Contributor
I think this looks good @jonathanc-n can you take a look as well? |
asolimando
commented
Mar 16, 2026
Member
Thanks for working on this @kumarUjjawal, but I have a few suggestions:
This forces to change all consumers, but it would prove more robust over time.
|
kumarUjjawalforce-pushed
the
fix/precision_sum_i64
branch
from
March 17, 2026 05:09
27eff84 to
e88ae02CompareDandandan
commented
Mar 17, 2026
Contributor
@kumarUjjawal can you fix CI? |
kumarUjjawal
commented
Mar 17, 2026
ContributorAuthor
@Dandandan Done! |
asolimando
approved these changes
Mar 17, 2026
asolimando
left a comment
Member
There was a problem hiding this comment.
LGMT, the PR is hardening as much as possible for a non-breaking change, improving over the current situation
kumarUjjawal
commented
Mar 17, 2026
ContributorAuthor
@asolimando Thanks for the review! |
kumarUjjawalforce-pushed
the
fix/precision_sum_i64
branch
from
March 25, 2026 09:36
698bc14 to
38f727aComparekumarUjjawal
commented
Mar 25, 2026
ContributorAuthor
@alamb this is good to go. |
Contributor
Thanks @kumarUjjawal and @Dandandan |
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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 discussed in the review thread on #20768 and tracked by #20826,
sum_valueshould not keep narrow integer column types during stats aggregation, because merge/multiply paths can overflow before values are widened.What changes are included in this PR?
This PR updates statistics
sum_valuearithmetic to match SUM-style widening for small integer types, and applies that behavior consistently across merge and multiplication paths.Are these changes tested?
Yes
Are there any user-facing changes?