Repository navigation
fix: support altering temporary table columns and names - #28324
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? |
49d0b0a to
cfa6195
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed exact head cfa61957e4d652dfb941d37ee77d0b0f07ecb6de. No confirmed blocking issue found.
The design consistently separates session-visible aliases from physical relation names: planning preserves logical names without mutating resolved metadata; execution resolves the owning session alias and rejects missing aliases or a different relation ID. This avoids accidentally altering a permanent shadow table and avoids mutating a reusable logical plan with physical execution names.
I checked COPY and INPLACE flows, nested SQL/session propagation, independent session visibility, rename destination collisions, index/allocator preservation, statement/transaction rollback, and failure cleanup. The session's existing AddTempTable/RemoveTempTable mutation journal is important here: these are not untracked map writes. COPY removes its intermediate alias on exit, drops the logical temporary source explicitly, and restores the source alias after the replacement rename. Internal CREATE inherits the owning session ID, preserving physical-name ownership for cleanup. Temporary operations appropriately avoid persistent FK/view/branch-lineage bookkeeping while ordinary table paths retain it.
The tests cover missing/stale aliases, planner immutability, COPY versus INPLACE selection, permanent-name shadowing, preserved rows/index lookup/defaults/auto-increment, failed narrowing and occupied rename, transaction rollback, a second connection, and intermediate-table leakage. The allowlist continues to reject unsupported operation families rather than claiming all temporary-table ALTER syntax is implemented.
Performance/resource assessment: no new background workers or unbounded persistent state; column COPY retains the existing whole-table copy cost and allocator/index work, while eligible in-place changes remain in-place. I found no concrete new cancellation, rollback or ownership blocker in the inspected paths.
Validation limits: complete diff and relevant caller/lifecycle source review, test/golden inspection, and git diff --check. I did not freshly execute the native UT/BVT cluster or a race suite in this review, and did not wait for CI. This approval does not turn golden-file inspection into a claim of independently executed black-box tests.
Merge Queue Status
This pull request spent 29 minutes 13 seconds in the queue, with no time running CI. Waiting for
All conditions
ReasonPull request #28324 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.
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
|
…#28324) ## 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#28303 ## What this PR does / why we need it: fix: support altering temporary table columns and names --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…#28324) ## 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#28303 ## What this PR does / why we need it: fix: support altering temporary table columns and names --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…#28324) ## 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#28303 ## What this PR does / why we need it: fix: support altering temporary table columns and names --------- 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 #28303
What this PR does / why we need it:
fix: support altering temporary table columns and names