feat: Calculate non-distinct sum from column statistics when available#23863
Open
AdamGS wants to merge 1 commit into
Open
feat: Calculate non-distinct sum from column statistics when available#23863AdamGS wants to merge 1 commit into
sum from column statistics when available#23863AdamGS wants to merge 1 commit into
Conversation
sum from column statistics when availablesum from column statistics when available
AdamGS
marked this pull request as draft
July 24, 2026 13:25
Signed-off-by: Adam Gutglick <adamgsal@gmail.com>
AdamGS
force-pushed
the
adamg/sum-from-stat
branch
from
July 24, 2026 13:41
5ea45cf to
28411d6
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #23863 +/- ##
========================================
Coverage 80.70% 80.71%
========================================
Files 1090 1090
Lines 370150 370424 +274
Branches 370150 370424 +274
========================================
+ Hits 298746 298998 +252
- Misses 53598 53611 +13
- Partials 17806 17815 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AdamGS
marked this pull request as ready for review
July 24, 2026 16:11
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
Seems like a valuable optimization for sources that report the
sumstatistic.What changes are included in this PR?
Implements
Sum::value_from_stats, supporting direct column expressions andcast(col)expressions introduced by type coercion.Casts direct-column statistics to the aggregate return type so decimal sums use the widened
SUMtype.Are these changes tested?
Unit coverage for statistics-backed
SUMvalues and decimal accumulator widening, plus core integration coverage for integer and decimal sums from statistics.Are there any user-facing changes?
None