Repository navigation
Conversation
dc1b650 to
9ba9a52
Compare
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? |
aptend
left a comment
There was a problem hiding this comment.
Deep review completed at exact HEAD 1a42d49. No blocking findings.\n\nThe routing change matches the relation invariant: a cluster table is a normal persisted DML target with an added tenant key, not an internal vector/text index table. Admitting SystemClusterRel at the existing modern-path gate reuses the generated/default row-image construction and dedup + MULTI_UPDATE machinery, while DMLContext still rejects non-sys writes before planning. The composite key remains serial(id, account_id), explicit/implicit account_id placement is preserved, and INSERT IGNORE retains duplicate suppression instead of falling back to the misleading unsupported-index error.\n\nI checked the broadened surface across VALUES, INSERT SELECT, prepared INSERT, LOAD, REPLACE/ODKU compatibility, generated columns, CHECK atomicity, tenant rejection, and multi-table INSERT. The explicit multi-table rejection prevents the new classification from accidentally admitting an unsupported shape, and the pre-route OVERWRITE/PARTITION-value checks preserve the legacy exact errors. No new resource ownership, waits, or unbounded state are introduced. Exact-head CI is green.\n\nIndependent validation passed: git diff --check and the focused cluster INSERT, special-syntax, LOAD, and unsupported multi-insert planner tests.
|
Queued — the merge queue status continues in this comment ↓. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact HEAD 1a42d49. No blocking findings.
The routing change is constrained to SystemClusterRel: non-sys writes are still rejected during DML target resolution, while sys writes now reuse the established generated/default row-image, dedup, and MULTI_UPDATE pipeline. I traced implicit and explicit account_id, composite-key serialization, VALUES/SELECT/prepared/LOAD inputs, INSERT IGNORE mixed duplicate/new rows, REPLACE/ODKU/update recomputation, generated-column rejection, and CHECK atomicity. The resulting plan keeps tenant identity in both the write image and conflict key.
Counterexamples at the syntax boundary remain closed: cluster INSERT OVERWRITE and PARTITION-value syntax retain their exact rejection before row construction, and multi-table INSERT rejects cluster targets explicitly. No new shared state, resource lifecycle, or unbounded work is introduced. Exact-head required CI is green, and the focused planner plus cluster-table BVT evidence exercises the changed public path.
Merge Queue Status
This pull request spent 6 minutes 48 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #28088 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.
Failing checks:
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. Tick the box to put this pull request back in the merge queue (same as
|
…igin#28088) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27923 issue matrixorigin#27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream matrixorigin#28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…igin#28088) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27923 issue matrixorigin#27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream matrixorigin#28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…igin#28088) ## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27923 issue matrixorigin#27924 ## What this PR does / why we need it: Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error. Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point. The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity. Validation on 9ba9a52: - focused CGo planner tests: PASS; the original regression tests fail on parent ffc8d9f, and the special-syntax BuildPlan test fails on prior PR head d71c8e8 - complete ./pkg/sql/plan CGo test package: PASS - rebased `TestCommitWithLockTablesChanged` after upstream matrixorigin#28069: PASS - make build: PASS - cluster_table BVT: PASS 258/258 twice on one readiness-complete instance; cleanup postconditions PASS - git diff --check: PASS - semantic preflight review: PASS, diff hash b4ad69a703b391306ba0e920379920597e9019f83fdf9028fa69ba70c0696b8b CI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
What type of PR is this?
Which issue(s) this PR fixes:
issue #27923
issue #27924
What this PR does / why we need it:
Cluster-table INSERT statements fell back to the legacy planner, where generated columns could reach the physical write as NULL and INSERT IGNORE was rejected. This change classifies SystemClusterRel as a regular modern DML target so VALUES, INSERT SELECT, prepared INSERT, INSERT IGNORE, and LOAD DATA use generated/default row construction plus MULTI_UPDATE. Multi-table INSERT remains unsupported for cluster tables and now returns a precise NotSupported error.
Modern routing preserves the previous special-syntax contract: INSERT OVERWRITE on a cluster table and INSERT with PARTITION values return their existing exact NotSupported errors instead of appending rows or ignoring the partition tuple. The regression coverage reaches these checks through the production BuildPlan entry point.
The regression fixture verifies STORED and VIRTUAL generated columns, implicit and explicit account_id placement, serial(id, account_id), dedup planning, special-syntax rejection, and the LOAD path. The cluster-table BVT adds terminal coverage for generated values, composite-key tenant separation, INSERT IGNORE variants, REPLACE/UPDATE/ODKU recomputation, LOAD DATA INLINE, tenant permission errors, exact special-syntax errors, explicit generated-column rejection, and CHECK-failure atomicity.
Validation on 9ba9a52:
TestCommitWithLockTablesChangedafter upstream test(txn): isolate lockservice operation deadlines #28069: PASSCI is running on the rebased exact head; QA is pending. QA still needs the exact PR build sys/tenant matrix and the 2-CN + Proxy write/reconnect/read smoke.