Repository navigation
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.
Reviewed the full six-file diff at head 577cd036ddaf4f741cf89f0d04340074f63b7bad. I found no blocking issue. Truncating intermediate base-10 chunks and applying half-up only to the final chunk preserves the single-round result; the signed-minimum D128/D256 cases and extreme negative-scale guards are handled without an intermediate overflow. The ordinary one-chunk path remains unchanged, and the multi-chunk helpers add no allocation or shared state. Exact-head UT, SCA, coverage, and relevant BVT jobs are green. Follow-up test hardening (non-blocking): a compact big.Int differential table around scale chunk boundaries and positive/negative exact ties would give broader arithmetic coverage.
Fixes matrixorigin#28772 ## Summary - Truncate intermediate DECIMAL scale-down chunks and apply half-up rounding only once on the final chunk. - Preserve D256 signed-minimum magnitude during scale-down without a wrapping left shift. - Apply the same final-only rounding rule to D128/D256 multiplication scale-down helpers. - Add focused Go and SQL regression coverage, including persisted DML results. ## Validation on 10.222.1.55 - Full CGo-wrapper package tests passed for pkg/container/types and pkg/sql/plan/function. - decimal_scale_rounding BVT: 8/8 passed. - Multi-step helper microbenchmark: zero allocations, no material regression (D128 flat, D256 about 1.6% faster). Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fixes matrixorigin#28772 ## Summary - Truncate intermediate DECIMAL scale-down chunks and apply half-up rounding only once on the final chunk. - Preserve D256 signed-minimum magnitude during scale-down without a wrapping left shift. - Apply the same final-only rounding rule to D128/D256 multiplication scale-down helpers. - Add focused Go and SQL regression coverage, including persisted DML results. ## Validation on 10.222.1.55 - Full CGo-wrapper package tests passed for pkg/container/types and pkg/sql/plan/function. - decimal_scale_rounding BVT: 8/8 passed. - Multi-step helper microbenchmark: zero allocations, no material regression (D128 flat, D256 about 1.6% faster). Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fixes matrixorigin#28772 ## Summary - Truncate intermediate DECIMAL scale-down chunks and apply half-up rounding only once on the final chunk. - Preserve D256 signed-minimum magnitude during scale-down without a wrapping left shift. - Apply the same final-only rounding rule to D128/D256 multiplication scale-down helpers. - Add focused Go and SQL regression coverage, including persisted DML results. ## Validation on 10.222.1.55 - Full CGo-wrapper package tests passed for pkg/container/types and pkg/sql/plan/function. - decimal_scale_rounding BVT: 8/8 passed. - Multi-step helper microbenchmark: zero allocations, no material regression (D128 flat, D256 about 1.6% faster). Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fixes #28772
Summary
Validation on 10.222.1.55