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? |
|
Tick the box to add this pull request to the merge queue (same as
|
|
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: 9b43079f2f03f25202ad681c6b2e62f3d3f7fd5c
Assessment: request_changes
The restored function identities address the reported 568/0 collision, but the release check omits other v4.2.9 overloads used by persisted ENUM defaults. This is a pre-existing compatibility gap that remains within the linked issue’s released-expression contract.
Model: gpt-6.1-terra / max
Session: 01a23642-a5da-74a3-9479-4bd000540084 · slot 0 · generation 54
- P2
optools/check-function-registry/main.go:183: Upgrade a stopped v4.2.9 database containing a column such asENUM('a,b','c') DEFAULT 'c', then insert a row that uses its default.
Impact: The released planner can persistCAST_VALUE_TO_INDEXoverload 306/1 for this framed domain. The target registers only overload 306/0, so the saved default cannot be evaluated. The checker nevertheless reports success because it excludes overloads below ID 562. This compatibility gap predates the PR, but it leaves the released-expression requirement of #33700 unresolved and hidden by the new check.
Evidence: The v4.2.9 source at 6c05e42 creates framed domains and adds their encoding argument when binding the default; its volatile overload remains in the stored expression. The target preserves the old overload index inpkg/sql/plan/build_util.go:3245, butpkg/sql/plan/function/list_builtIn.go:16051has no 306/1 andfunction.go:610rejects it. A diagnostic copy of the checker that also compares this function reports the mismatch; the unmodified checker passes. Coordinate the released ENUM overloads with #32886, make the known conflict visible in the release check, and cover the path with a released framed-domain default fixture.
Validation:
-
Private temporary-directory and loopback preflight passed; receipt 1796266326851927640-3.json.
-
The unmodified source-only registry checker passed for v4.2.9 source, v4.2.8, v4.2.8-hotfix-20261114, and the 4.2-dev revision pinned in #33700 against the assigned head.
-
A diagnostic checker including CAST_VALUE_TO_INDEX reported the released overload 1 mismatch; receipt 1796266663629281684-3.json and registry-306.log.
-
git diff --check passed for the assigned base and head; receipt 1796266732362105810-3.json.
-
The PR reports an exact-head v4.2.9 upgrade and focused race tests. In the frozen CI snapshot, the shared build succeeded, unit tests were in progress, and upgrade jobs were skipped.
Limitations:
-
The required Go 1.27.1 toolchain download timed out, so no project Go tests or physical upgrade reproduction were run locally. The registry checks used Go 1.26.6 in standalone mode.
-
The framed-default failure path is established from the released writer and target reader source, not from an independently executed SQL fixture.
-
An exploratory all-ID comparison stopped on duplicate JSON_LENGTH declarations; it did not establish a complete release-wide overload inventory.
9b43079 to
7522420
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: 75224202b9f5406725a983c15cc789edd5d09f7c
Assessment: request_changes
The previously missing framed ENUM overload is restored, and the added decoder and converters address its distinct released semantics. A separate legacy ENUM default compatibility gap remains within the linked issue’s persisted-expression scope. The registry checker’s documented peer command also produces a false failure.
Model: gpt-6.1-terra / max
Session: 01a237df-a073-7910-ac2c-836d2d273b8a · slot 1 · generation 43
-
P2
pkg/sql/plan/function/list_builtIn.go:16080: Upgrade a v4.2.9 table with an unframed definition such as ENUM('a','b') DEFAULT '0x2', then insert using the stored default.
Impact: The released planner stores this default as CAST_VALUE_TO_INDEX 306/0 and evaluates it to ordinal 2. The candidate retains that ordinal during catalog rebinding but evaluates it with the existing decimal-only converter, producing an ENUM truncation error. This incompatibility predates the PR, but leaves the persisted-expression contract of #33700 incomplete.
Evidence: A probe built from the pinned v4.2.9 release source produced the serialized 306/0 default and evaluated it successfully; the candidate failed after loading and rebinding those exact bytes. The new release-compatible converter is registered only for tagged overload 306/1. Preserve the released 306/0 behavior at an appropriate compatibility boundary and cover an unframed release-produced default. -
P3
pkg/sql/plan/function/function_id.go:25: Follow the documented two-argument registry command when the 4.2-dev peer contains functions awaiting their main-branch port, as at the peer revision pinned by #33700.
Impact: The checker treats the peer as a release and reports peer-only COMPRESS_V2 as a missing released function, preventing the documented check from succeeding for an allowed branch state.
Evidence: The two-argument check against peer 355a64c fails on COMPRESS_V2, while the release-plus-peer invocation passes. Document the release as the first argument and the peer as the optional third argument, or provide an explicit peer-only mode.
Validation:
-
Preflight passed; receipt checks/1796274842678903746-3.json.
-
Focused registry, ENUM decoder, function and planner tests passed; focused-tests.log and receipt checks/1796275168393832895-3.json.
-
The pinned v4.2.9 source produced and evaluated unframed defaults successfully; release-producer.log and receipt checks/1796275570239913142-3.json. Evaluation of those exact serialized defaults on the candidate failed with ENUM truncation; exact-release-default-target.log and receipt checks/1796275637996883076-3.json.
-
The release-plus-peer registry check passed; registry-check.log and receipt checks/1796274948966359660-3.json. The two-argument peer check failed as described; peer-two-arg.log and receipt checks/1796275664239662593-3.json.
-
git diff --check passed; receipt checks/1796275762923470572-96.json.
Limitations:
-
The release-default reproduction used the pinned release source and focused planner and executor probes; it was not a full physical database upgrade.
-
The author reports a separate framed-ENUM WAL recovery failure on both base and head, tracked under #32886 and #32826. That physical recovery issue was not independently rerun.
7522420 to
9601b68
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: e9f7636e271eab78f8c2ea167a7f005558d9201e
Assessment: request_changes
The earlier framed-overload, text-default and generated-column concerns are addressed in the current source. Reusing the existing catalog migration and registry is reasonable, but an unframed numeric ENUM overload still changes released behavior after upgrade. The required public upgrade result also lacks traceable execution evidence in the assignment.
Model: gpt-6.1-terra / max
Session: 01a23ad7-1273-7211-9d10-4a57bddbf580 · slot 0 · generation 55
-
P2
pkg/sql/plan/catalog_function_identity.go:32: Create a v4.2.9 table withn SMALLINT UNSIGNEDande ENUM('a','b') GENERATED ALWAYS AS (n) STORED, upgrade it, set non-strict SQL mode, and insertn = 3without IGNORE.
Impact: The released generated expression rejects the out-of-range ordinal. After upgrade, the same stored expression can accept the row with a warning and store ENUM ordinal zero. This compatibility gap predates the PR but remains within the linked issue's persisted-expression contract.
Evidence: The v4.2.9 binder persists the unframed numeric assignment as CAST_INDEX_VALUE_TO_INDEX 307/0; its evaluator returns an error unless the statement uses IGNORE. The new catalog normalizer repairs 306/0 text calls but leaves 307/0 unchanged. The current 307/0 evaluator permits truncation in non-strict mode. Route released numeric calls through the release-compatible evaluator and cover a release-produced generated expression with valid, strict, IGNORE and fresh-main controls. -
P2
pkg/sql/plan/build_util_test.go:157: Validate the changed handling of a v4.2.9-generated ENUM expression through a stopped upgrade and subsequent SQL writes.
Impact: The required public upgrade behavior cannot be independently established from the supplied evidence. The committed fixture test evaluates a reconstructed expression directly and does not prove table resolution, SQL writes or restart behavior.
Evidence: The PR reports stopped-upgrade checks, butlocal_validationis empty and no matching commands, terminal receipts or SQL logs were supplied; the frozen upgrade CI jobs were skipped. Provide the retained exact-head results, or run the smallest stopped-4.2.9 generated/default case with a fresh-main control and preserve its command and terminal output.
Validation:
-
Private temporary-directory and loopback preflight passed: checks/1796284358405022038-3.json and preflight.log.
-
The standalone registry checker passed against the pinned v4.2.9 source commit and supplied 4.2-dev peer: checks/1796283825840787451-3.json and registry-check.log.
-
The generated protobuf descriptor matched the base after removing exactly the declared new boolean field: checks/1796284142378453215-4.json and descriptor-check.log.
-
The frozen base-to-head diff passed
git diff --check: checks/1796284074634785583-3.json. -
Saved review-plan.md and discussion-assessment.json; all 10 discussion keys are accounted for.
Limitations:
-
No project Go test or SQL upgrade test was independently executed: the required Go 1.27.1 download failed with a TLS handshake timeout before compilation, as recorded in checks/1796283859932849292-3.json and go-test-registry-auto.log. This is an environment failure, not a product-test result.
-
The PR reports broader package, race and stopped-upgrade testing, but matching execution artifacts were not included in the supplied evidence. The frozen CI snapshot had the shared build in progress, unit tests queued and upgrade jobs skipped.
-
Current release and hotfix status beyond the supplied v4.2.9 baseline was not independently verified. The separately tracked framed-ENUM WAL recovery issue was not rerun or attributed to this PR.
e9f7636 to
c4c1628
Compare
c4c1628 to
69ae7c6
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: 69ae7c67675e97c5f067a006210ccc586bf54732
Assessment: request_changes
The released ENUM overloads and catalog migration address the prior review concerns. The migration reuses the existing catalog and dispatch boundaries, but the requested release or CI safeguard for future registry divergence is not integrated.
Model: gpt-6.1-terra / max
Session: 01a23a4f-ba37-79e1-ad8d-cd6bacb29eeb · slot 2 · generation 23
- P2
pkg/sql/plan/function/function_id.go:25: A later change allocates an ID already used on the other active branch or changes a persisted overload without someone manually running and interpreting the registry checker.
Impact: The branch can pass its ordinary checks while introducing another identity conflict that causes persisted expressions to dispatch incorrectly after an upgrade.
Evidence: Linked issue #33700 calls for a release or CI check. The repository only documents this command in a source comment; the checker unit test uses synthetic Git trees and no release or CI workflow invokes it against the actual release and peer. Its overload comparison also excludes IDs below 562 except the three ENUM converters. Integrate the comparison into an owned release or CI step and make relevant future overload changes visible, accounting explicitly for established compatible differences.
Validation:
-
The registry checker passed against the v4.2.9 source commit and the supplied 4.2-dev peer; log registry-check.log and receipt checks/1796287603165088023-3.json.
-
TestReleaseAndPeerRegistries passed through the assigned test executor; log checker-test.log and receipt checks/1796288557093931116-3.json.
-
The generated protobuf descriptor matched the merge base after removing only the new Function field; receipt checks/1796288117471430675-4.json. git diff --check passed; receipt checks/1796288811964550132-3.json.
-
The PR body reports a stopped v4.2.9-to-head upgrade with SQL commands and captured results. The review plan and complete discussion assessment were saved in the assigned diagnostic directory.
Limitations:
-
Two bounded attempts to run TestDecodeEnumMembers timed out while downloading dependencies, before the test executed. The larger package suites and physical upgrade were not independently rerun.
-
The author reports that framed physical ENUM recovery also fails on the baseline and is tracked separately. Relevant CI checks in the frozen snapshot were pending or skipped.
Signed-off-by: XuPeng-SH <[email protected]>
69ae7c6 to
b62672b
Compare
|
mo-bot review · Commit: linked issue or PR description changed before publication |
|
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: b62672bfbe3d9c2859f8ef0760d760a863ebc895
Assessment: request_changes
The earlier compatibility and CI concerns are addressed, but the new tagged ENUM executors violate the repository's vector-dispatch requirement by checking a batch-invariant property for every row. The reported planning benchmarks do not measure this execution path.
Model: gpt-6.1-terra / max
Session: 01a237df-a073-7910-ac2c-836d2d273b8a · slot 1 · generation 43
- P2
pkg/sql/plan/function/func_enum_tagged.go:144: Execute a batch against a released generated ENUM expression whose domain and encoding are constant, such as a bulk insert into an upgraded table.
Impact: Each processed row repeats the constant-versus-varying domain decision, even though it is fixed for the batch. This violates the pinned repository rule requiring constant-argument dispatch before vector loops; it is a policy and design finding, not a measured SQL latency regression.
Evidence: newTaggedEnumDomain determines domain.constant at line 40, but domain.at checks it on every call from the loops at lines 81, 109, and 143. EnumDisplayToIndex also checks it directly inside its loop at line 192. The pinned .agents/skills/mo-self-review/SKILL.md:48-51 and mo-dev/references/type-dispatch.md:39-44 require this decision once before the loop. Select the constant or varying-domain path before iteration while preserving null, error, and dynamic-domain behavior.
Validation:
-
Private /tmp and loopback preflight passed: checks/1796292933937148876-3.json.
-
The registry checker passed against the frozen v4.2.9 release, 4.2-dev peer, candidate head, and updated target base: registry-run.log and checks/1796292947991475839-3.json.
-
Reused the prior same-head CI scope run: 28 tests passed. The retained log and receipt are under reused/.
-
Reused the prior generated-descriptor comparison after verifying that its relevant head and base protobuf inputs are unchanged. Its log and receipt are under reused/.
-
Reviewed the author's stopped-v4.2.9 upgrade transcript and the current fixture and catalog paths.
Limitations:
-
No project Go package test was independently completed. The prior exact-head attempt could not start with the installed Go 1.26.6, and the Go 1.27.1 download timed out.
-
The frozen CI snapshot had upgrade jobs skipped and principal unit and coverage jobs incomplete. The author reports package and race runs without supplying their raw logs.
-
Framed physical ENUM recovery and some older SQL archive failures are reported as separately tracked baseline limitations.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #33700
What this PR does / why we need it:
The catalog persists a function's numeric ID, overload position and bound operands. Recent main reused released slots. Restoring the right name alone can still dispatch a three-argument conversion with two arguments, or accept the same input and store a different ENUM value.
Validation
ENUM('a','b') DEFAULT '0x2'. A previous PR head fails a post-upgrade insert with 1265. The current head inserts 'b'. With ten labels, '010' still selects 'h' in both released defaults and generated columns, and 'j' in existing or newly created main tables.Stopped 4.2.9 upgrade · SQL commands and captured results on b62672b
The writer was the official v4.2.9 Linux binary. Use the same standalone launch configuration, service IDs, ports and local data directories for both binaries. Start each with its own matching native libraries. Stop each cleanly with SIGTERM. Both the control and upgraded server started from copies of the same stopped data. With the MySQL client using batch output, the writer returned:
After switching the executable, these are the actual commands and outcomes. The four numeric rows and both text rows were selected again after another clean restart.
The release control produced the same errors, warning counts and rows. On the same release files, e9f7636 accepted the non-strict out-of-range row with warning 1265. On a table written by the previous main (3a1d778), and on a freshly created candidate table, the same non-strict insert succeeded with warning 1265, strict returned error 1265, and text '010' selected 'j'. The control used DEFAULT 'b' on main. The two actual catalog fixtures come from
SELECT HEX(attr_generated) FROM mo_catalog.mo_columns WHERE att_database='en33711' AND att_relname='t' AND attname='e'.Captured client output (tab-separated, with empty ENUM values at the ends of rows)
Scope
Physical 4.2.9 columns whose ENUM type uses framed member metadata still fail native storage recovery on the old main and the candidate. A stopped WAL fixture reports a non-string collation revision. A global-checkpoint fixture reports an invalid type encoding header before SQL becomes ready. The native type and index port is tracked by #32886 and #32826. A separate historical SQL archive limit remains: DUMP of some 4.2.9-authored generated expressions is rejected by the binding verifier on both base and head, including an integer arithmetic control. Some 4.2.9 SQL-only manifests also fail schema fingerprint reconstruction on a control. The V2 compression registrations are tracked by #33558.