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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 8b92a0417a5a796ce9ea0dac972899d90e0c0b50
Assessment: request_changes
Reviewed the complete 22-file delta. Shared DOUBLE finalization appropriately fixes decimal rounding without changing accumulation or partial-state layout. Two reproduced native aggregate protocol gaps leave mixed-version execution unsafe.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
-
P1
pkg/sql/compile/remoterun.go:2101: A pre-113 coordinator sends a final decimal statistical Group descriptor to a protocol-113 receiver during rolling upgrade.
Impact: The receiver silently changes the physical result ABI from DECIMAL128 to DOUBLE. Carry and validate the native descriptor's result contract, rejecting incompatible legacy descriptors or preserving their expected output.
Evidence: The new guard checks only the receiver's runtime version. Native descriptors omit the aggregate result type, so expression-level legacy rejection does not apply. TestReviewLegacyFinalDecimalDescriptorExecution passed a legacy descriptor through decodeScope and real Group execution: its DECIMAL128 projection emitted DOUBLE 6.666666666666667e-37. Retained descriptor-execution-v2.log and receipt checks/1792010833029645810-3.json record the failed ABI assertion. -
P1
pkg/sql/compile/expression_destination_protocol.go:51: A decimal statistical aggregate's destination reports protocol 113 during placement but protocol 112 when its native Group/MergeGroup scope is serialized.
Impact: The send-time gate permits execution on an incompatible worker, which can return DECIMAL results to a coordinator expecting DOUBLE. Include native aggregate descriptors in the shared destination requirements.
Evidence: constructGroup lowers the function expression into an aggregate ID and argument expressions. RequiredRemoteExpressionFeatures consequently misses its changed result contract; validateRemoteAggregateProtocol checks only the sender's local version. TestReviewDecimalDescriptorSendFloor reproduced successful encodeRemoteScope calls with zero destination probes for all four Group/MergeGroup × DECIMAL64/128 combinations. See descriptor-probes.log and checks/1792010627780419412-4.json.
Validation:
-
Isolation preflight passed. Independently reconciled 192 native source inputs, 62 artifact hashes, and the repository build-owner command/receipt/log.
-
All six full affected Go packages passed with -count=1 and the supplied test-exec: defines, pb/plan, colexec/aggexec, plan/function, plan, and compile. Receipt: checks/1792010639292012257-5.json; log: affected-packages.log.
-
Production encode/decode counterexamples and native Group execution reproduced both findings. Diagnostic overlays preserved the source checkout.
-
Independently verified 12 large-variance SQL snapshot values using 110-digit Decimal arithmetic; this was not SQL execution.
-
The exact-head CI snapshot reports successful build, Ubuntu UT, SCA, coverage, proxy BVT and pessimistic multi-CN BVT; upgrade jobs were skipped.
-
Commands, source fingerprints, exit receipts, log hashes and diagnostic-source hashes are reconciled in /home/xupeng/.local/state/mo-bot/jobs/1a5ed343a450b06045268db6/attempt-1/evidence-audit.json. Complete review record: review-record.json in the same directory.
Limitations:
-
No mixed-binary cluster or SQL/client reproduction was run; the findings use production protocol boundaries and native operator execution.
-
Performance assessment is structural: finalization removes decimal formatting/parsing and halves result payload width; receive validation adds a linear pipeline walk. No throughput benchmark was performed.
-
No retained worker validation gate, raw CI case logs, or full linked-issue body was supplied. Initial diagnostic fixture/selector failures were corrected and excluded from product findings.
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: a7809b40685d401f10abb921fd0b45333cfb79a3
Assessment: approve
Reviewed the complete 24-file delta. Shared DOUBLE finalization fixes precision loss while preserving native accumulation and partial-state formats. Explicit aggregate result metadata and fresh destination checks close both prior protocol findings. The design reuses existing owners and removes decimal conversion overhead without adding row-level work. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a12d8f-7dea-77c2-a565-38d45b5564e4 · slot 0 · generation 0
Validation:
-
Focused current-head tests passed: 6 top-level tests and 112 subtests across compile, protobuf-plan and SQL-plan packages, covering placement, descriptor encoding/decoding, version rollback and persisted contracts.
-
Reconciled commands, clean-head fingerprints, exit receipts and retained logs in attempt-1/evidence-audit.json. Isolation preflight passed; 192 native inputs and 62 artifacts matched build-owner provenance.
-
Verified generated protobuf changes, formatting and diff checks. Reconciled retained independent arithmetic checks for 12 SQL expectations against byte-identical inputs.
-
Frozen exact-head CI reports successful shared build, Ubuntu unit tests, arm64 static analysis, coverage and proxy/pessimistic multi-CN BVT.
Limitations:
-
No mixed-binary upgrade cluster or performance benchmark was run; upgrade CI was skipped. Compatibility validation used production encode/decode entry points with controlled protocol responses.
-
Raw author BVT counts and the linked issue's full body were unavailable; assessment uses the frozen PR contracts, comments and CI snapshot.
Merge Queue Status
This pull request spent 18 minutes 25 seconds in the queue, with no time running CI. ReasonPull request #30228 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
Main took MORPCVersion113 for DECIMAL variance/stddev DOUBLE results (matrixorigin#30228). The IndexSearchScan search knobs move to MORPCVersion114 (latest); vectorscan.SearchKnobsProtocolVersion points at it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
DECIMAL variance and standard-deviation aggregates computed in float64 but returned DECIMAL128 with an input-dependent scale. For DECIMAL(38,18) values 1e-18, 2e-18 and 3e-18, both variances became zero and standard deviations were rounded to 1e-18. These functions now return DOUBLE, matching the MySQL numeric result domain and preserving approximately 6.666666666666667e-37, 1e-36, 8.16496580927726e-19 and 1e-18.
The shared return-type helper and DECIMAL64/128 executor factories now use float64 results. Native decimal arguments, exact-origin centering, stable recurrence, DISTINCT identity and legacy/current partial-state layouts retain their contracts. MORPC v113 gates the changed result ABI at worker placement, actual destination validation, aggregate decoding and persisted-expression admission; legacy DECIMAL-typed expressions require rebinding. Native Group/MergeGroup descriptors explicitly carry the DOUBLE result type, including partial and nested scopes. Receivers reject missing or incompatible result contracts before constructing operators, and actual sends recheck descriptor requirements together with expression requirements using one destination observation. Temporal numeric operands follow the same DOUBLE result domain. Explicit DECIMAL result casts use the existing DOUBLE cast semantics, covered with an independent literal-cast control.
Validation:
decodeScoperegressions and complete compile package passed; vet/lint and the service rebuild passed. The affected forced-AP case passed 26/26 twice on the rebuilt service with verified teardown.Finalization removes float-to-decimal conversion work and uses 8-byte DOUBLE result cells. Consumers requesting DECIMAL results can explicitly cast them; ordinary float approximation and DOUBLE-to-DECIMAL cast rounding continue to apply. The previous head passed remote build, UT, SCA, coverage and both active multi-CN BVT lanes; remote CI for this descriptor repair is pending. Reporter verification of #30179 is expected after merge.