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? |
66c2eac to
d94c2ad
Compare
|
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: d94c2ad7a72f319f3b6f9568e4d91cb87901a466
Assessment: request_changes
Reviewed the complete six-file delta. Reusing conversion status and the existing warning sink is sound, but runtime constant folding still suppresses numeric DECIMAL overflow warnings.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
- P2
pkg/sql/plan/function/func_cast.go:181: Evaluate SELECT CAST(1000 AS DECIMAL(5,2)) FROM t across multiple selected rows or batches.
Impact: The runtime executor folds the numeric cast once and caches its value, emitting only one warning instead of one per evaluated row. Subsequent batches emit none, underreporting SHOW WARNINGS and @@warning_count.
Evidence: The SQL-planner/executor probe TestReviewCastRangeRows produced one warning for two selected rows and still one after another three rows. The equivalent string-cast control produced two, then five. Runtime folding protection in evalExpression.go only recognizes string-to-numeric casts; finishFolding caches this newly warning-producing numeric cast. Extend that protection and add an executor-level regression. Reproduction: attempt-1/integration-probes.log and checks/1792093610906286491-2.json (exit 1), under /home/xupeng/.local/state/mo-bot/jobs/0079365f5ddb91dbe55c3805.
Validation:
-
Function and rule package suites passed with -count=1 and the supplied test executor; owning-tests.jsonl matches receipt checks/1792093454742119298-2.json (exit 0).
-
Both changed prepared-planner tests and six independent prepared integer/string controls passed. The numeric-row counterexample failed while its string control passed.
-
Preflight passed. Verified 192 native inputs and 62 artifacts, then ran the current Makefile build owner. evidence-audit.json reconciles commands, source fingerprints, exits and retained logs; the source checkout remains clean.
-
The frozen evidence records successful UT, SCA, shared-build and BVT jobs. Warning classification was also checked against the MySQL conversion implementation.
Limitations:
-
The counterexample exercises SQL planning and the production expression executor, not a running protocol server. Author-reported BVT and protocol runs have no retained local artifacts in the supplied evidence.
-
No performance benchmark was run. Source review found no additional parsing or I/O on ordinary paths; warning rows add formatting and sink calls.
-
Linked issue bodies were not supplied; their stated contracts were assessed through the frozen PR description and source.
725de6b to
a9e8d97
Compare
|
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: a9e8d97c24fe31eb2ef15c8627ca5abb914e9b26
Assessment: approve
Reviewed the complete 17-file delta and supplied review history. No actionable findings remain. Conversion status and the existing warning sink preserve row-level diagnostics without reparsing. Silent DECIMAL256 constants reuse the existing scalar-vector representation, preserving temporal statement ownership and prepared-plan correctness. All three historical warning-count regressions are closed.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1517-7f90-b3f9-c5f9f9e7031b · slot 0 · generation 1
Validation:
-
Isolation preflight passed. Built native prerequisites through the repository Makefile from 192 verified current-revision inputs; source remained unchanged.
-
Full function, rule, plan and colexec suites passed with -count=1 and -vet=all: 6,060 passing test roots. Seven unrelated ONNX tests were skipped.
-
TestPreparedNumericTemporalContracts passed through a real one-CN MySQL frontend, including masks, NULLs, prepared reuse, temporal ownership and empty/inactive controls. Independent probes passed for scalar-vector consumers, numeric parameter semantics and 18 binary prepared temporal-join executions.
-
Matched base/head runtime benchmarks over 8,192 safe prepared rows measured explicit casts at 9.855 ns cached versus 319.285 μs and 26,281 bytes per evaluation. The implicit control remained approximately 9 ns. This quantifies the intentional cost of retaining per-row evaluation.
-
Commands, source fingerprints, exits, overlays and retained logs were reconciled in /home/xupeng/.local/state/mo-bot/jobs/ed0d2e6a4a2401fe1622e464/attempt-1/evidence-audit.json. Final audit receipt checks/1792171644380752314-4.json exited 0.
Limitations:
-
Linked issue bodies were absent; their declared contracts were assessed through the frozen PR description, comments and regression sources.
-
No independent multi-CN, historical-version or mo-tester replay was performed. The supplied CI snapshot reports successful enabled BVT jobs without raw case logs.
-
Performance measurements cover expression execution, not end-to-end SQL throughput or concurrency. No live MySQL differential run was performed.
Merge Queue Status
This pull request spent 52 minutes 13 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for any of
All conditions
Requeued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 1 hour 19 minutes 56 seconds in the queue, with no time running CI. ReasonThe merge conditions cannot be satisfied due to failing checks
HintYou may have to fix your CI before adding the pull request to the queue again. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
Explicit CAST already clamps DECIMAL overflow and wraps/clamps string integer overflow, but silently discards the conversion diagnostics. Preserve these values and report warning 1264 for decimal clamping, 1105 for signed/unsigned complements, and 1292 for integer range truncation through the existing statement warning sink.
Propagate range status from the existing parsers to execution without reparsing. Numeric DECIMAL casts now honor the selection mask before conversion and warning publication. Existing warning probes retain warning-producing constant casts for execution; pure value helpers and numeric prepared-parameter semantics remain intact.
Earlier author validation on macOS arm64 (before the runtime-folding follow-up):
function/func_cast.test: 317/317 passed twice on one isolated standalone instance, with teardown checked between runs. Covers strict/non-strict modes, literal and column casts, warning retention/count, and SQL PREPARE reuse.Runtime execution also retains explicit DECIMAL casts as row-scoped conversions. Numeric literals and integer parameters transported as TEXT must not enter the folded-value cache or a statement diagnostic owner, so every evaluated row reports its range warning across batches and executor reuse. Silent implicit casts retain their folding path.
Validation on macOS arm64 (runtime-folding follow-up):
Scope: warning 1264 uses the existing function-layer target label
decimaland local row ordinal. Existing interval constant-normalization shortcuts and lexical negative-zero diagnostics are unchanged. Existing unsigned negative-overflow modulo values are preserved; the warning is classified from the original magnitude. No new persistent state or native dependencies; no extra parsing is added solely for diagnostics.Please leave both issues open for reporter verification after merge. CI results are pending.