Skip to content

fix(plan): keep correlation depth for ENUM/SET outer columns - #32271

Merged
XuPeng-SH merged 7 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-31568-main-514cdc40
Nov 9, 2026
Merged

XuPeng-SH merged 7 commits into
matrixorigin:mainfrom
gouhongshen:agent/issue-31568-main-514cdc40

Conversation

@gouhongshen

@gouhongshen gouhongshen commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #31568

Related to #31568.

What this PR does / why we need it:

A legal correlated EXISTS / NOT EXISTS (or comparison, IN / NOT IN variant) whose association key is an ENUM or SET column was rejected during planning with SQL parser error: Column remapping failed: cannot find column reference, while the same fixture worked for ordinary joins, LEFT-JOIN anti-join and integer-key correlations. MySQL 8.4 accepts the queries.

Root cause (WHERE/clause shape): in baseBindColRef the ENUM/SET display-value wrapper bound its wrapped column as a plain Expr_Col regardless of the binding depth. A correlated outer ENUM/SET key is resolved by the outer binder at depth>0 and must be emitted as Expr_Corr so subquery flattening can pull it across scopes; the depth-blind wrapper leaked an unresolvable outer column reference (for example l.k with the outer tag) into the subquery's filter list and column remapping failed.

Change 1 (pkg/sql/plan/base_binder.go): the ENUM/SET display wrapper now emits Expr_Corr carrying the binding depth, mirroring the ordinary column path (including the full-group-by aggregate position adjustment); depth == 0 keeps the previous Expr_Col shape so non-correlated plans are unchanged.

Review follow-up: wrapped correlations in grouped-subquery HAVING

The first commit repaired the WHERE positions, but the ONLY_FULL_GROUP_BY HAVING variants of the issue still failed (review finding on the ... GROUP BY r.k HAVING r.k=l.k shapes): with the correlation kept on the wrapped reference, HavingBinder.BindColRef only recognized bare top-level Expr_Corr references, and mysqlFullGroupByAllowsExprColumns walks only plain column/function nodes, so the nested correlation was invisible and legal outer keys were rejected with column ... must appear in the GROUP BY clause while the same shape with an INT key planned.

Change 2 (pkg/sql/plan/having_binder.go + mysql_full_group_by.go): the HAVING validation now extracts the wrapped correlation with a narrow helper (displayWrappedCorrColRef, which only unwraps the exact cast_index_to_value(<members>, <reference>) shape produced by baseBindColRef, with isEnumOrSetDisplayValueExpr) and passes it through the same target-scope checks as a bare correlated reference; when none applies, the rejection and its error stay unchanged. An outer ENUM/SET key in a grouped subquery's HAVING therefore gets the identical accept/reject decision as an outer INT key, dependent references keep working (grouped outer key, grouped outer primary key through the any_value remap) and ungrouped cases keep failing exactly like their INT equivalents.

Issue-to-test proof and commands

All commands ran with the repository wrapper (CGo mode). Parent/base for the red proof is the PR parent 6cb85576 (fix reverted) and the pre-merge base 70d39334e1; both fail identically, the INT/VARCHAR controls pass on both, so the delta is the wrapped ENUM/SET reference alone. The mo-bot review's frozen-head probes independently reproduce the same HAVING failures on 6cb85576.

  • Focused planner UT pkg/sql/plan/mysql_special_correlated_test.go (three tests, all executed in the commands below):
    • TestCorrelatedExistsOnEnumSetKeysPlans / TestCorrelatedEnumSetWrapperKeepsOuterReference: correlated EXISTS/NOT EXISTS/plain/CAST probes and the flattened-join wrapper check (red/green on 70d39334e1).
    • TestCorrelatedGroupedHavingOnEnumSetKeysPlans: the reported grouped-subquery HAVING shapes — ENUM/SET EXISTS/NOT EXISTS with GROUP BY r.k HAVING r.k=l.k, and grouped-outer blocks where the grouped primary key makes the ungrouped outer key functionally dependent. Red (exit 1, 6 failing subtests) on the fix-reverted head, green with the fix:
      .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -run 'TestCorrelatedGroupedHaving|TestCorrelatedExistsOnEnumSetKeysPlans|TestCorrelatedEnumSetWrapperKeepsOuterReference' ./pkg/sql/plan -> ok.
    • TestCorrelatedGroupedHavingMatchesIntKeyPolicy: decision parity between special-typed and INT outer keys across four shapes, including two rejection pairs (no primary key, key not grouped; inner local key not grouped) proving the target-scope checks stay enforced for wrapped correlations.
  • Complete owning package, normal mode, unfiltered, on the final head:
    .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout 2400s ./pkg/sql/plan -> ok, exit 0, zero failures.
  • CGO_CFLAGS="-I$PWD/cgo -I$PWD/thirdparties/install/include" go vet ./pkg/sql/plan -> clean; golangci-lint run --new-from-rev <merge-base> -> 0 issues.
  • BVT pair test/distributed/cases/dtype/issue_31568_enum_set_correlated_exists.{test,result} (result generated with mo-tester genrs against the fixed binary and inspected statement-by-statement against MySQL semantic derivations): covers ENUM and SET correlated EXISTS/NOT EXISTS, explicit casts, same/reversed member definitions, NULL keys, NULL-augmented correlation, IN/NOT IN, LEFT-JOIN anti-join control, integer-key control, plus nine grouped-HAVING statements (ENUM/SET EXISTS/NOT EXISTS/IN, grouped-outer-by-PK, same-member and INT controls, health checks). In comparison mode with the CI-path flags it passes 44/44 statements at 100% against the same clean instance, with the created database verified absent from the catalog after each run (real teardown, not masked by entry-time DROP IF EXISTS).

CI follow-up: compose-PROXY BVT failures from session sql_mode inheritance

CI run 42128708082 (attempt 1) failed multi cn e2e bvt test docker compose(PROXY) with 9 failures, all in this PR's own BVT file: unsupported expression executor for typ:<... enum_l/set_l ...> corr:<...>, SQL parser error: Column remapping failed: cannot find column reference, and correlated columns in aggregate function. The multi-CN/proxy topology was not the differential. mo-tester reuses one connection across the whole run_bvt_group.sh execution and dtype/enum.sql ends with set session sql_mode = '' without restoring it, so every later dtype file - including this PR's - executed with a relaxed sql_mode. Under that mode the query builder selects the mysqlCompatible HAVING path instead of the mysqlFullGroupByCompat path the fix targeted; the wrapped correlated ENUM/SET reference was not recognized as a correlation there and was folded into any_value, which then either leaked a raw Expr_Corr into the executed plan, died in column remapping, or surfaced the pre-existing correlated-aggregate NYI (the same verdict the INT control gets in that mode). The 9 statements were reproduced byte-for-byte on a local single-process instance of head 3fc67ae33a after set session sql_mode='' and passed again after set session sql_mode=default, isolating the trigger to the session mode rather than the deployment.

Change 3 (pkg/sql/plan/having_binder.go): the relaxed-mode HAVING binder now rejects a wrapped correlated ENUM/SET reference at bind time with the same correlated columns in aggregate function NYI a bare correlated column gets in that mode, instead of building the doomed any_value-wrapped plans. In ONLY_FULL_GROUP_BY mode the Change 2 correlation planning is unchanged; free local keys keep the existing any_value behavior.

Change 4 (test/distributed/cases/dtype/issue_31568_enum_set_correlated_exists.test): the BVT pair now pins the semantics it asserts, following the dtype convention already used by order_by_clause.sql / update_text_coalesce_cast.sql: save @@session.sql_mode, set session sql_mode = default, execute the contract under MySQL's default mode, then restore the inherited value and guard the restore with an equality check. The file is now independent of the session state earlier files leave behind on the shared mo-tester connection, and later files observe exactly the state they observed before (including the enum.sql pollution).

Follow-up proof:

  • TestLooseGroupByHavingCorrelatedKeyRejected (in the same UT file): under a relaxed sql_mode every special-typed correlated grouped-HAVING shape - EXISTS/NOT EXISTS/IN with ENUM and SET keys, plus grouped-outer variants - fails binding with the same NYI as its INT control, while a free local ENUM key without correlation keeps planning (the any_value path stays intact). Red on head 3fc67ae33a with Change 3 stashed: the seven special-typed subtests fail (the plan-level shapes build broken plans or hit the remapping error); green with Change 3.
    .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=300s -run 'TestCorrelatedExistsOnEnumSetKeysPlans|TestCorrelatedEnumSetWrapperKeepsOuterReference|TestCorrelatedGroupedHavingOnEnumSetKeysPlans|TestCorrelatedGroupedHavingMatchesIntKeyPolicy|TestLooseGroupByHavingCorrelatedKeyRejected' ./pkg/sql/plan -> ok.
  • BVT mode-pinning proof: with the updated pair, genrs on a fresh session produces a result file byte-identical to the committed one for all pre-existing statements, and run mode passes 44/44. A CI-order simulation (one connection: pollute set session sql_mode='' -> pinned file -> restore check) regenerates a byte-identical result for the pinned file, passes 46/46 at 100%, and verifies the inherited loose mode is restored afterwards, so downstream dtype files keep their current behavior.
  • Service-level counterfactual on the fixed binary: the 9 CI-failing statements under sql_mode='' now fail binding with the clean correlated columns in aggregate function NYI (matching their INT controls) instead of the three internal-error classes, and the same suite under sql_mode=default still returns the committed MySQL-checked results.

Review follow-up 2: direct outer-column aggregate arguments

The mo-bot review of 73cab4f3c4 found one remaining incomplete consumer of the kept correlation: HavingBinder.BindColRef's insideAgg/bindingProjectedAlias branch still recognized only a bare top-level Expr_Corr, so an outer ENUM/SET key bound as cast_index_to_value(<members>, Expr_Corr) bypassed its correlated-aggregate admission checks when it appeared directly in an aggregate's arguments — for example SELECT l.id, (SELECT MAX(l.k) FROM enum_r r) FROM enum_l l, the COUNT variant, and the grouped-subquery HAVING MAX(l.k) form. Planning admitted the plan with the correlation reachable inside ordinary AGG node arguments, aggregate-argument evaluation then failed with an unsupported-expression NYI (pkg/sql/colexec/evalExpression.go has no Expr_Corr case), while the identical query with an INT key was rejected during binding.

Change 5 (pkg/sql/plan/having_binder.go): the insideAgg/bindingProjectedAlias branch now extracts the wrapped correlation with the existing displayWrappedCorrColRef helper and runs the identical admission sequence on that reference — the aggregate-argument-subquery exception, the rebound-alias/current-query-input exception, and the grouped-HAVING target-scope exceptions — before the same correlated columns in aggregate function NYI. A wrapped ENUM/SET key therefore gets exactly the bare-INT verdict for every shape: rejected when the correlation would stay live inside an ordinary aggregate's arguments, admitted where an existing exception already permits the same correlation for INT.

Follow-up proof:

  • Reproduction probe on the previous head 73cab4f3c4: the six ENUM/SET direct-aggregate-argument shapes admitted plans whose AGG nodes carried the nested Expr_Corr inside the aggregate arguments (the executor construction dead end), while all INT twins failed binding with the correlated-aggregate NYI.
  • TestCorrelatedAggregateArgsOnEnumSetKeysMatchIntPolicy (new UT in mysql_special_correlated_test.go): four paired families with ENUM/SET + INT twins — MAX scalar subquery, COUNT scalar subquery, grouped-subquery HAVING MAX, grouped-outer-PK HAVING EXISTS — assert both decision parity and the concrete NYI; three positive controls prove the aggregate-argument-subquery exception still admits wrapped WHERE-position correlations end-to-end so enum/set/int all plan.
  • Red/green on this repo: the new UT fails on 73cab4f3c4 with special-typed key accepted while the INT key is rejected: "select l.id, (select max(l.k) from enum_r r) from enum_l l" and passes with the fix; the five maintained correlation tests and the INT-pinning TestOnlyFullGroupByPreservesCorrelatedAggregateNYI stay green.
  • Complete owning package on the final head: .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=3600s ./pkg/sql/plan → ok (exit 0); go vet ./pkg/sql/plan and golangci-lint run --new-from-rev <merge-base> → clean.
  • BVT pair: issue_31568_enum_set_correlated_exists.test gained fifteen statements — eight ENUM/SET rejections, four INT-twin rejections, and three end-to-end positive controls; the .result was regenerated against the fixed binary with mo-tester genrs (all pre-existing statement entries byte-identical) and the updated pair passes in comparison mode at 100%.

Residual limit (pre-existing, unchanged by this round): select max((select l.k from ...)) — a wrapped correlated reference in a scalar subquery's bare projection used as an aggregate argument — still fails with the pre-existing wrapped correlated scalar projection cannot be safely decorrelated NYI, identical before and after this change, while its INT twin plans. That is a separate decorrelation capability, not an invalid-plan admission, so it stays out of this fix.

Residual risks and limits

  • Plan shape changes only for ENUM/SET display bindings at nonzero depth (WHERE positions) and their HAVING validation; depth == 0 paths are unchanged and the complete owning-package suite passes in normal mode on the final head.
  • The separately-reported SET raw-bitmap comparison wrong-result defect is out of scope and untouched.
  • The distributed dtype directory group and multi-CN topologies remain for CI; the changed behavior is planner-side and the single-CN tenant path is covered twice here.

Base synchronization (2026-11-09)

Scheduled ci_base_refresh: main had advanced 42 commits past this PR's merge-base. Merged origin/main @ e2459cc55f into this branch (merge commit 73cab4f3c4, no conflicts; the PR's own files are byte-identical to the pre-merge head). Re-validated on the merged head with the repository CGo wrapper:

  • .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -run 'TestCorrelatedExistsOnEnumSetKeysPlans|TestCorrelatedEnumSetWrapperKeepsOuterReference|TestCorrelatedGroupedHavingOnEnumSetKeysPlans|TestCorrelatedGroupedHavingMatchesIntKeyPolicy|TestLooseGroupByHavingCorrelatedKeyRejected' ./pkg/sql/plan (exact five-test regression selection) → ok, 5/5 tests + 30 subtests PASS, 0 FAIL.
  • .agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -timeout=3600s ./pkg/sql/plan (complete owning package, unfiltered) → ok (133.99s), including upstream's newly merged planner tests for the 42 commits — no semantic drift.
  • GOWORK=off go vet -mod=readonly ./pkg/sql/plan (repo CGo environment) → clean.

The previously recorded red/green proofs are unchanged: the fix commits and their tests are byte-identical across this merge. Fresh CI runs on the new head.

The ENUM/SET display-value wrapper in baseBinder.baseBindColRef built a
plain Expr_Col for the wrapped column regardless of binding depth. When
a correlated subquery resolved an outer ENUM/SET key through its outer
binder at depth>0, the wrapper dropped the correlation depth and left an
unresolvable plain column reference inside the subquery scope, so plan
building failed with "Column remapping failed: cannot find column
reference" for legal EXISTS/NOT EXISTS (and comparison/IN variants)
whose association key is an ENUM/SET column.

Emit an Expr_Corr carrying the binding depth in that branch, mirroring
the ordinary column path (including the full-group-by aggregate position
adjustment); depth==0 keeps the previous Expr_Col shape, so
non-correlated plans are unchanged.

Root cause, red/green proof on base 0384130, BVT result-file
generation and residual risks are detailed in the PR description.

Related to matrixorigin#31568
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH

XuPeng-SH commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: 73cab4f3c4ab06e5a10da838594cecf971ad95b0

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 73cab4f3c4ab06e5a10da838594cecf971ad95b0

Assessment: request_changes

Preserving correlation depth inside the existing ENUM/SET display wrapper is an appropriate narrow fix, and the previous grouped-HAVING finding is resolved. One consumer remains incomplete: direct outer-column aggregate arguments bypass their existing binder guard and produce plans whose arguments cannot be evaluated.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

  • P2 pkg/sql/plan/base_binder.go:957: With an ENUM or SET outer key, SELECT l.id, (SELECT MAX(l.k) FROM enum_r r) FROM enum_l l reaches HavingBinder.BindColRef's insideAgg branch with the new display-wrapped Expr_Corr. COUNT and grouped-HAVING MAX arguments have the same problem.
    Impact: The branch at having_binder.go:220-250 recognizes only a top-level Expr_Corr, so these expressions bypass its correlated-aggregate admission checks. Planning succeeds with reachable correlations in an ordinary aggregate's arguments, but aggregate-argument executor construction returns an unsupported-expression NYI. Equivalent INT inputs are rejected by the binder.
    Evidence: candidate-executor.jsonl records six ENUM/SET failures and three INT bind-rejection controls on this head; candidate-planner-recovered.jsonl and baseline-planner.jsonl show that the candidate admits these plans whereas the merge-base rejects them. constructGroup (pkg/sql/compile/operator.go:1989) passes these arguments to group argument evaluation (pkg/sql/colexec/group/exec2.go:304), whose expression executor has no Expr_Corr implementation (pkg/sql/colexec/evalExpression.go:571). Apply displayWrappedCorrColRef in the insideAgg/bindingProjectedAlias branch as well, preserving its existing permitted-scope exceptions and rejection policy, and add paired ENUM/SET/INT aggregate-argument regression coverage. These forms already failed on the merge-base; the demonstrated defect is invalid-plan admission, not loss of previously supported results.

Validation:

  • Read all six changed files, relevant binder/remapping/execution consumers, closing issue #31568 and its expanded reproduction, and all six discussion entries. discussion-assessment.json covers every discussion key exactly once; the prior grouped-HAVING concern is resolved.

  • Exact-head local Go execution passed all five maintained correlation regression tests, including their 30 subtests. A diagnostic-only overlay classified 66 SQL cases on the candidate and the merge-base production overlay; planner-comparison.json retains the paired outcomes.

  • The focused aggregate-argument executor probe exited 1 with six confirmed ENUM/SET failures; its three INT controls rejected the unsupported forms during binding. Logs, overlay inputs and command/source/exit receipts are retained and reconciled in validation-ledger.json.

  • relational-oracle.log independently checks all 26 SELECT result groups across the 44-statement distributed fixture using label/NULL semantics. The fixture's save/default/restore sequence was also checked under two modeled inherited SQL modes.

  • Reused source-pinned author evidence for the full owning planner package and public SQL/BVT runs, and the successful substantive CI snapshot at this exact head. Earlier failed CI states are retained as historical evidence, not passes.

  • Runtime preflight passed. Native reuse was verified against 196 current input hashes, seven native outputs and 27 generated headers. Initial incomplete native staging caused a pre-test build failure; after setup recovery, the recorded focused tests ran using the assigned task caches and test-exec.

  • final-evidence-audit.log and its exit-0 receipt verify the frozen head, unchanged tracked source, discussion coverage, overlay provenance and matching retained validation receipts.

Limitations:

  • No local MatrixOne SQL service or multi-CN execution was run. The finding is established by finalized planner arguments, the real expression-executor constructor and the traced execution consumer.

  • The SQLite oracle validates relational expected rows; it does not exercise MatrixOne ENUM/SET physical representation, protocol metadata or actual session-mode restoration. Public service evidence is reused from the supplied snapshot.

  • Archived author proof files and raw external CI logs were not locally available. The assessment uses the supplied evidence snapshot and retained local checks; historical unrelated CI failure explanations were not independently reproduced.

…e guard

HavingBinder's insideAgg/bindingProjectedAlias branch type-asserted only a
bare top-level Expr_Corr, so an outer ENUM/SET key - kept as a correlated
reference inside the display wrapper by matrixorigin#31568's repair - bypassed its
correlated-aggregate admission checks when used directly as an aggregate
argument (for example SELECT l.id, (SELECT MAX(l.k) FROM enum_r r) FROM
enum_l l, plus the COUNT and grouped-HAVING MAX variants). Planning admitted
the plan with the correlation intact in ordinary aggregate arguments, whose
expression executor the group evaluation cannot construct, while equivalent
INT keys were rejected at bind time.

The branch now extracts the wrapped reference with the existing
displayWrappedCorrColRef helper and runs the unchanged admission sequence on
it - the aggregate-argument-subquery exception, the rebound-alias exception
and the grouped-HAVING target-scope exceptions, then the same
correlated-columns NYI - so a wrapped ENUM/SET key gets the identical verdict
as its INT twin for every shape.
@gouhongshen

Copy link
Copy Markdown
Contributor Author

@XuPeng-SH valid finding — fixed in b029266f55 (fix(plan): bind wrapped ENUM/SET keys through the correlated-aggregate guard).

Diagnosis confirmed: with the correlation kept inside the display wrapper, an outer ENUM/SET key binds as cast_index_to_value(<members>, Expr_Corr), and the insideAgg/bindingProjectedAlias branch of HavingBinder.BindColRef recognized only a bare top-level Expr_Corr, so a direct outer-column aggregate argument fell through its correlated-aggregate admission checks. Reproduced on 73cab4f3c4: all six ENUM/SET shapes admitted plans whose AGG nodes carried the nested Expr_Corr inside ordinary aggregate arguments - the executor construction dead end you traced - while every INT twin failed binding with the correlated-aggregate NYI.

Fix (pkg/sql/plan/having_binder.go): exactly as suggested. The branch now reads the wrapped reference through the existing displayWrappedCorrColRef helper and runs the unchanged admission sequence on it - the aggregate-argument-subquery exception, the rebound-alias exception and the grouped-HAVING target-scope exceptions, then the same correlated columns in aggregate function NYI. A wrapped ENUM/SET key therefore gets the bare-INT verdict for every shape.

Paired aggregate-argument regression coverage:

  • New UT TestCorrelatedAggregateArgsOnEnumSetKeysMatchIntPolicy (mysql_special_correlated_test.go): four paired families with ENUM/SET + INT twins - MAX scalar subquery, COUNT scalar subquery, grouped-subquery HAVING MAX, grouped-outer-PK HAVING EXISTS - assert both decision parity and the concrete NYI. Red on the previous head with special-typed key accepted while the INT key is rejected: "select l.id, (select max(l.k) from enum_r r) from enum_l l"; green with the fix. Three positive controls also pin that the aggregate-argument-subquery exception still admits wrapped WHERE-position correlations for enum/set/int alike.
  • BVT issue_31568_enum_set_correlated_exists.test gained 15 statements: 8 ENUM/SET rejections, 4 INT-twin rejections and 3 end-to-end positive controls. The .result was regenerated against a locally built fixed binary with mo-tester genrs (pre-existing entries byte-identical, the diff is pure additions) and the updated pair passes 59/59 at 100% in comparison mode on an isolated local cluster.
  • Complete pkg/sql/plan package suite (mo-cgo-test -count=1 -timeout=3600s ./pkg/sql/plan), the five maintained correlation tests and TestOnlyFullGroupByPreservesCorrelatedAggregateNYI all pass on the final head; go vet ./pkg/sql/plan and golangci-lint --new-from-rev <merge-base> are clean.

Residual limit (pre-existing, unchanged by this commit): select max((select l.k from r)) - a wrapped correlated reference in a scalar subquery's bare projection - still fails with the existing wrapped correlated scalar projection cannot be safely decorrelated NYI, identical before and after this change, while its INT twin plans. That is a separate decorrelation capability rather than an invalid-plan admission, so it is not part of this fix.

@XuPeng-SH

XuPeng-SH commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

mo-bot review · mo-bot-local · done

Commit: b029266f557bcfbaf05510dd4beac859d862225e

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: b029266f557bcfbaf05510dd4beac859d862225e

Assessment: approve

Both prior findings are resolved. Wrapped ENUM/SET references retain correlation depth and follow existing HAVING and aggregate scope checks. The fix reuses established remapping and validation owners without adding execution state.

Model: gpt-6.1-sol / max

Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0

Validation:

  • Reviewed the complete six-file delta, closing issue #31568 and all nine discussion entries; discussion-assessment.json covers every key.

  • Full vet-enabled planner suite passed: 4,865 top-level tests, including all six new groups and the existing INT rejection control; two unrelated subtests skipped. Receipt: checks/1794236403075877452-2.json; log: plan-normal.jsonl.

  • All 24 additional planner cases passed for scalar aggregates, ORDER BY/LIMIT, nested correlation, aliases and aggregate-input scope. Receipt: checks/1794236640670881511-2.json.

  • Independent label/NULL oracle matched 29 value SELECTs in the 59-statement fixture; 12 NYI expectations match source and paired planner controls. Receipt: checks/1794236078754281848-2.json. An earlier oracle count assertion was corrected; its script, failed receipt and log remain retained.

  • Isolation preflight passed; reused native artifacts matched 196 current inputs, seven outputs and 27 headers. Final audit confirmed clean source, matching frozen delta, gofmt and receipt/log consistency; validation-summary.json.

  • Frozen-head CI reports successful UT, SCA, coverage, PROXY/PESSIMISTIC BVT and CI Required.

Limitations:

  • No local MatrixOne service or multi-CN execution. Author service results and CI statuses were assessed from supplied evidence; raw external logs were unavailable. SQLite validates logical values; session restoration was modeled.

  • Bare wrapped-correlated scalar projection remains an unsupported decorrelation case outside this repair.

@mergify mergify Bot added the queued label Nov 9, 2026
@mergify

mergify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

❌ Left the queue · CI preflight fails with this pull request

39 min in the queue, with no time running CI.

So far

  • ✅ Entered the queue Mon 9 Nov, 15:07 · rule main · triggered by rule Automatic queue on approval for main
  • ❌ Checks failed · in place
  • 🚫 Left the queue 15:46 · a05ddfa

The failure is in this pull request. It failed tested alone on top of main.

Reason

The merge conditions cannot be satisfied due to failing checks

  • CI Required

Failing checks:

To get back in the queue

  • Push a fix: the pull request is queued again once its queue conditions match.
  • If the failure is a flake, tick the box below to queue it again as it is.

Merge conditions not met when it left the queue

  • any of · required by GitHub branch protection:
    • check-neutral = CI Required
    • check-skipped = CI Required
    • check-success = CI Required

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request
2 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection

Times in UTC · dashboard · how the merge queue works

This branch was successfully deployed

No deployments
ci — a05ddfa0 Deployed Nov 9, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dequeued kind/bug Something isn't working size/L Denotes a PR that changes [500,999] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants