Skip to content

fix(plan): reject unsupported invisible columns - #26909

Merged
XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:m-26860
Aug 10, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:mainfrom
iamlinjunhong:m-26860

Conversation

@iamlinjunhong

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 #26680

What this PR does / why we need it:

fix(plan): reject unsupported invisible columns

@iamlinjunhong
iamlinjunhong requested a review from a user August 10, 2026 07:23
@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 →

@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Aug 10, 2026

@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.

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 VISIBLE is 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.

@XuPeng-SH
XuPeng-SH merged commit 00cb7ef into matrixorigin:main Aug 10, 2026
25 checks passed
@iamlinjunhong
iamlinjunhong deleted the m-26860 branch August 23, 2026 17:13
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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]>
VioletQwQ-0 pushed a commit to VioletQwQ-0/matrixone that referenced this pull request Sep 17, 2026
## 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]>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants