Repository navigation
fix(agg): preserve DECIMAL AVG integer capacity - #28828
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
GPT-6 medium deep review of exact head 65d9cf76b61b8084ba136232b56b87e6ae09911b: no blocker found. The new DECIMAL256 AVG return type preserves the input's integer capacity while increasing scale; planner typing and ordinary, DISTINCT, and window execution share the same result scale. Empty/all-NULL groups, rounding, overflow, and final precision checks remain intact. The added tests are six small single-row aggregate cases with no cluster or concurrency fixture, and no major racing-UT slowdown mechanism is apparent.
Exact-head Ubuntu UT and CI Required pass. The distributed BVT job passed, though its artifact could not be fetched during this review, so I have not independently verified the case-level SQL transcript. This is a self-authored PR, so this is COMMENT only.
## Summary - preserve DECIMAL256 AVG input integer capacity while capping public precision at 65 - keep the result scale within the available precision for ordinary, DISTINCT, and window aggregation - add exact max-value regressions and return-type coverage Fixes matrixorigin#28776 ## Validation - focused and full `pkg/sql/colexec/aggexec` CGo tests - `go vet` and incremental `golangci-lint` (0 issues) - `make -j8 build` - isolated SQL validation for DECIMAL(62,0) and DECIMAL(65,30), positive/negative, grouped/window AVG, and empty-set NULL Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Summary - preserve DECIMAL256 AVG input integer capacity while capping public precision at 65 - keep the result scale within the available precision for ordinary, DISTINCT, and window aggregation - add exact max-value regressions and return-type coverage Fixes matrixorigin#28776 ## Validation - focused and full `pkg/sql/colexec/aggexec` CGo tests - `go vet` and incremental `golangci-lint` (0 issues) - `make -j8 build` - isolated SQL validation for DECIMAL(62,0) and DECIMAL(65,30), positive/negative, grouped/window AVG, and empty-set NULL Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
## Summary - preserve DECIMAL256 AVG input integer capacity while capping public precision at 65 - keep the result scale within the available precision for ordinary, DISTINCT, and window aggregation - add exact max-value regressions and return-type coverage Fixes matrixorigin#28776 ## Validation - focused and full `pkg/sql/colexec/aggexec` CGo tests - `go vet` and incremental `golangci-lint` (0 issues) - `make -j8 build` - isolated SQL validation for DECIMAL(62,0) and DECIMAL(65,30), positive/negative, grouped/window AVG, and empty-set NULL Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Summary
Fixes #28776
Validation
pkg/sql/colexec/aggexecCGo testsgo vetand incrementalgolangci-lint(0 issues)make -j8 build