Repository navigation
fix(group): keep exact totals for parted keyless affine I64 AVG - #1476
Merged
Merged
Conversation
singaraiona
reviewed
Nov 23, 2026
singaraiona
left a comment
Collaborator
There was a problem hiding this comment.
Verified at a9a0088.
- Exact: keyless single
avgover a parted I64 column (plain,x ± c,c ± x, narrow constants) is exact against the oracle across 450 cases, where dev gets 49–50 of each 50 wrong. - No regressions: every other route is byte-identical to dev.
- Speed: 5–14× faster.
- Tests: the pins fail on dev.
I added the coverage note to the body. Grouped and multi-aggregate AVG stay open in #1440. Approved.
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.
Part of #1440. For a single unfiltered keyless AVG over a parted I64 column plus or minus an I64 constant, reduce each partition's evaluated expression to an exact total and non-null count. Merge those across batches and divide once, rather than merging wrapped I64 SUM results. Preserve the output name and type. Grouped and other unfixed AVG cases remain open under #1440.
98fdf2c0plus this patch, focused Clang ASan/UBSan grouping passed 93/93 with no skips, including the new route-checked plus/minus regression and its equivalence run. The regression crosses the eight-partition batch boundary. No full suite run locally.8c18b24aplus the identical patch, checks at 1 and 8 cores verified exact flat parity, typed F64 null, aliases and the unaliased graph result name. F64, filtered, direct-column and multi-aggregate controls kept their baseline results and routes.8c18b24a, five alternating trials on one nine-partition fixture (~400k rows per partition): common 49.60→13.09 ms (1 core), 19.44→7.27 ms (8); wide 51.27→13.44 ms (1), 19.03→7.03 ms (8). Both builds served the partitioned path. The wide baseline was incorrect; the candidate matched flat.Coverage after round 1 (from review). These are exact against an exact oracle on parted tables:
avgof a parted I64 column: plainavg x;x ± candc ± x;They are 5–14× faster than dev. Still open under #1440:
by:AVG;avg xwithcount x), since the route needsn_aggs == 1.