Repository navigation
fix: derive decimal rounding result metadata - #28625
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? |
|
Addressed all current reviewer comments in (fix commit ):\n\n- removed Decimal-to-BIGINT physical lowering so plans remain compatible with older CNs during rolling upgrades;\n- kept in Decimal128 and added execution coverage at MaxInt64/MinInt64, adjacent out-of-range values, and both 19-digit extrema;\n- restored constant two-argument // metadata refinement, including carry-aware precision;\n- merged the latest .\n\nLocal verification passed:\n\n- FAIL github.com/matrixorigin/matrixone/pkg/sql/plan/function [build failed] |
|
Addressed all current reviewer comments in
Local verification passed:
All four review threads have been replied to and resolved. CI for the new head is running. |
|
Resolved the failing coverage checks at head Root cause from the coverage diagnostics: the only failed assertion was Fix:
Local validation:
A fresh CI run has been triggered by the push. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed the complete current four-file change at 77537de against main b349fea. Prior DECIMAL(19,0) wrapping, incompatible BIGINT physical lowering and missing two-argument CEIL/FLOOR refinement are fixed. One P2 maximum-precision metadata blocker remains (inline).
The revised binder preserves Decimal64/128/256 OIDs, so the prior old-CN result-wrapper failure is removed. Nonnegative ROUND/TRUNCATE precision reduction distinguishes carry vs truncation and preserves dynamic/NULL fallback; boundary execution tests now include both signed-int64 neighbors and full 19-digit extrema. The ancillary port fixture reserves TCP while choosing UDP, bounds retries to EADDRINUSE and retains the failed-probe cleanup oracle; it is not evidence about rounding semantics.
Evidence: full diff/history and prior inline findings, exact-head binder/overload/evaluator and CTAS/parser consumers inspected. Reused the author's corrected package/build report and scoped repeated port test report; the earlier malformed comment containing failed build output is not treated as pass evidence. I did not run SQL/native tests, CTAS restore, mixed-version deployment or benchmarks; the finding is source-derived. Head/base rechecked before posting; CI not awaited.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Re-reviewed bfed62b against main@77dbf5464466b1d5ae784e7d17d92cd1c1c8d17d. No remaining concrete blocker found; prior requested changes are closed.
The DECIMAL(65,0), digits=-1 CEIL/CEILING/FLOOR counterexample now caps precision at 65 rather than publishing width 66. The new helper also respects Decimal64/128 bounds while retaining their physical OIDs. Added tests cover family maxima, carry below the maximum, and CTAS plus an equivalent schema parse/build round-trip. Prior DECIMAL(19,0) wrapping and old-CN incompatible BIGINT lowering remain removed; two-argument refinement remains present. Nonnegative ROUND carry precision cannot exceed the input width because that branch requires digits<input.Scale; TRUNCATE excludes the carry. Dynamic/NULL and negative ROUND/TRUNCATE fallbacks are unchanged.
Reviewed the full five-file PR diff, prior inline findings/replies and current delta, including the separate port-fixture fix. No new executor, wire, persisted representation or shared lifecycle is introduced by the rounding change; ordinary-fix design exemption applies. The port helper bounds retry to address-in-use, releases its TCP reservation, and preserves the failed-probe cleanup oracle.
Evidence: reused source review and author-reported focused plan/package/build validation; the new CTAS test exercises schema expressibility, not an executed backup/restore deployment. No independent native suite, mixed-version deployment, benchmark or CI wait. Exact live head/base rechecked immediately before submission.
|
Resolved the Ubuntu/x86 UT failure at head Root cause from Fix:
Local verification:
A fresh CI run has been triggered by the push. |
aptend
left a comment
There was a problem hiding this comment.
Deep re-review of exact head fd448b08353703331e1fe721fa53f36715cb09b0 against exact base a68a200c0bfb0c18f1b7f49d26b20b8d0d9b017f: APPROVE.
I read the complete review, inline-comment, author-reply, issue, and resolved-thread history; audited the current five-file diff and the delta since my prior reviewed head e98c59b344e2cd7fce8b4d6eef816c9e40dde335; and traced binding through overload selection, serialized result types, Decimal64/128/256 evaluators, result-vector scaling, CTAS/schema derivation, and the maximum-precision boundary.
All prior blockers are closed. DECIMAL(19,0) and the other decimal domains keep their existing physical OID, so values outside signed BIGINT do not wrap and old CN executors still receive the wrapper family they understand. Constant two-argument CEIL/CEILING/FLOOR refinement is restored. Carry-aware widths stay within the Decimal64/128/256 family maxima, including DECIMAL(65,0) with negative digits, and the added schema round trip prevents publishing DECIMAL(66,0). ROUND and TRUNCATE retain the conservative dynamic/NULL/negative-digits behavior while narrowing the unambiguous nonnegative literal case. The unrelated port-fixture correction and the bounded ISCP recovery deadline change are safe and scoped to tests.
Validation on the exact head: required third-party and CGO artifacts built; focused planner, function, and logservice tests passed; the changed ISCP recovery test passed; git diff --check and gofmt checks passed. I also added a temporary exact-head executor test for ROUND/TRUNCATE/CEIL/FLOOR over DECIMAL(10,4) at the carry boundary 999999.9999, using the newly narrowed result types; all four results and result-vector types passed, and the temporary test was removed. All exact-head CI checks are terminal with no failures.
Merge Queue Status
This pull request spent 58 minutes 8 seconds in the queue, including 57 minutes 38 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #28593
Part of #28595
What this PR does / why we need it:
Testing
CGO_CFLAGS="-I$PWD/thirdparties/install/include" CGO_LDFLAGS="-L$PWD/thirdparties/install/lib" go test ./pkg/sql/plan/function ./pkg/sql/plan -count=1make build