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? |
|
Follow-up fix pushed in |
aa038a4 to
2c56474
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep review of 2c56474 against base/merge-base 7db5bee: no new blocking finding in this PR's diff. COMMENT only because this account is the PR author; this is not a GitHub approval.
Reviewed all 10 changed files and traced three behavioral closures: SQL EXECUTE source-domain restoration and peer rebinding; FIELD string-family dispatch; and generated UINT64 vector-overfetch arithmetic through the expression/TVF consumer. Explicit CAST, real string boundaries, nested consumers, numeric-prefix conversion, binary-protocol separation, NULL and cached-plan immutability were checked. No new async/resource/wire-format contract requiring race or Q1-Q3 testing was identified.
Validation: reused successful current-head CI run 36085561188, including Ubuntu UT and multi-CN BVT (the pessimistic job selects prepared_variadic_comparison.sql and vector_prepared_limit.sql). Locally reran the focused variadic, FIELD and overfetch tests with CGo and -count=1. Independent reviewer probes verified fresh-plan equivalence/template immutability across numeric/text/binary/NULL/protocol transitions, and all 18 prepared DECIMAL-source overfetch boundary cases passed, including zero and UINT64_MAX in both overfetch modes. Direct-vs-prepared probes also covered explicit CHAR, nested/string boundaries, invalid numeric strings and Boolean sources.
Adjacent existing issue, not attributed to this PR: a DECIMAL(38,0) source 9007199254740993 passed to FIELD(?, 9007199254740992) yields 1, while direct SQL and the all-parameter control yield 0; an explicit DECIMAL fixed peer also reproduces it. The same probes fail identically on base 7db5bee and this head, so this was excluded from new blocking findings. This was reproduced through parsed PREPARE, production parameter specialization and expression evaluation, not a new live-service BVT run.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29317
Fixes #29318
What this PR does / why we need it:
Prepared SQL
EXECUTEtransported user variables as text and allowed provisional marker casts/numeric-prefix conversion to choose the wrong comparison domain for all-parameterGREATEST/LEASTandFIELD. BinaryFIELDoperands could also fall through toDOUBLEcomparison.FIELDtuples through the existing byte-preserving, case-insensitive string implementation. Leave COM_STMT protocol typing and explicit SQL casts unchanged.LEAST()arithmetic to explicitUINT64, so execute-time variadic rebinding cannot reinterpret a prepared LIMIT as signed or decimal. Cover saturation boundaries and decimal inputs.Validation on base
2f25834093(isolated local MatrixOne service): original three issue reproductions fail before the change and match direct SQL after it.pkg/sql/planandpkg/sql/plan/functionfull CGo test suites pass. New BVT: 37/37 statements pass. Earlier GPT-6 Astra medium independent final review: no blockers. The subsequent two unsigned-overfetch commits have focused planner regression coverage and are included in the current final review.Latest-main rebase and current validation
Rebased onto
matrixorigin/main@e914d987641c266162eb607ec072fdb5a2b06da9(including #29369); new head4876d85a92c2ef099bfd559771bd18abc7de3354. Main movedParamValuefromplantoexecutor; the conflict resolution keeps the existingplan.ParamValuealias and relocates this PR'sSourceTypecomment to the defining type inpkg/util/executor/options.go.git range-diffconfirms all behavioral patches are retained; the other eight file diffs are byte-for-byte identical.git diff --checkpasses.Focused post-rebase CGo tests passed for prepared variadic source domains, unsigned/decimal vector overfetch boundaries,
FIELDtype handling, and the newly merged preparedgenerate_seriesconsumers. Thepkg/sql/compileCGo test binary also compiled and linked successfully. Full CI on this head is pending.