Repository navigation
fix(plan): reject unsupported invisible columns - #26909
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head 94742fbbd0172ad34d17c9264a7e2cfc6f1e082d against PR base b0bbeeffea21ece3c288c9aa47d60658bbed6f5f and latest main 0989f741286c21069c1ac5f949f68783862003e8. No blocking correctness, compatibility, lifecycle, or general-case performance finding.
The violated invariant is closed at the planning boundary: an unsupported user-column visibility action must never return success as a semantic no-op. CREATE, ADD, MODIFY, and CHANGE all pass column attributes through applyDefaultAndColumnAttributesToType, while ALTER COLUMN ... SET INVISIBLE is rejected explicitly in AlterColumn. Each path fails before engine/catalog execution, so multi-clause errors cannot leave partial DDL state. Explicit index visibility remains unaffected because it uses the separate index-option path.
Q1-Q3 are clean: the change creates no resource owner, wait edge, or retained accumulation. Hot-path cost is also negligible because the added check is one case in an existing plan-time attribute scan; there is no row/batch execution cost.
Validation: the two new focused tests passed; the full pkg/sql/plan package passed; go build and go vet passed; additional counterexamples for temporary/generated columns, multi-clause ALTER, and algorithm hints were rejected as intended; git diff --check is clean; all current GitHub checks are terminal without failure; and the head merges cleanly with latest main.
Non-blocking follow-ups:
- The PR body links unrelated issue #26680; this change actually addresses #26860.
- Positive VISIBLE handling remains inconsistent outside this regression: MODIFY/CHANGE column definitions with explicit VISIBLE still hit the existing generic unsupported-attribute path, while
ALTER COLUMN ... SET VISIBLEis accepted as a no-op but is planned as COPY. A follow-up should either make explicit VISIBLE a cheap, uniform no-op for already-visible columns or reject unsupported visibility forms consistently.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#26680 ## What this PR does / why we need it: fix(plan): reject unsupported invisible columns Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#26680 ## What this PR does / why we need it: fix(plan): reject unsupported invisible columns Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#26680 ## What this PR does / why we need it: fix(plan): reject unsupported invisible columns Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
issue #26680
What this PR does / why we need it:
fix(plan): reject unsupported invisible columns