Repository navigation
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? |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 3b84e8a9a0d6f4e42a673a61b29b9b05b290e395
Assessment: approve
Reviewed the complete five-file delta and surrounding planner, executor, catalog and transaction paths. The design correctly preserves the original identity for binding and execution while using the final identity for validation and catalog publication. It reuses existing SQL builders and rollback ownership without introducing another execution path. No actionable defects remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Verified the clean frozen HEAD and exact patch. Reviewed all supplied comments; none contained unresolved technical concerns.
-
Isolation preflight passed. Native provenance verification matched 192 source inputs and 62 retained artifacts before execution.
-
Planner regression and ordered-state tests passed in rename-tests.jsonl. Receipt 1792071191586180248-2.json records overall exit 1 because the reviewer-added SQL probe had an unused import; that invocation did not execute SQL tests.
-
After correcting only the diagnostic overlay, SQL tests passed: both clause orders, quoted composite self-references, incoming/outgoing metadata, enforcement, rollback, ordered replacement/add-drop, and the existing self-reference catalog regression. rename-sql-v2.jsonl matches successful receipt 1792071258632899559-2.json.
-
The SQL package completed in 6.402 seconds; the added regression's scenario body took approximately 469 ms. Production overhead is one linear ALTER-option scan and small rename-SQL storage, with no additional catalog statements or SELECT/DML-path changes.
-
Reused frozen-head CI results showing successful Ubuntu UT, Linux/arm64 SCA, proxy BVT and pessimistic multi-CN BVT.
-
Command, source fingerprint, exit status, logs and artifact hashes were reconciled in /home/xupeng/.local/state/mo-bot/jobs/b8410dacc674ff359243ff7d/attempt-1/review-audit.json. Final audit receipt 1792071347552786990-2.json passed.
Limitations:
-
Full-suite and mo-tester runs were not repeated locally. Author-reported runs lack retained raw logs in the supplied packet; local behavioral checks and frozen CI provide independent coverage.
-
Multiple effective renames still encounter the unchanged TN old-name rejection. The diagnostic probe verified rollback preserved the original table/data and removed the attempted FK catalog changes.
-
The linked issue's standalone body was not supplied; its behavioral contract was assessed from the PR description and regressions. No throughput improvement is claimed.
Merge Queue Status
This pull request spent 1 hour 42 minutes 44 seconds in the queue, with no time running CI. ReasonPull request #30298 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. Waiting for any of
All conditions
Tick the box to put this pull request back in the merge queue (same as
|
What type of PR is this?
Which issue(s) this PR fixes:
What this PR does / why we need it:
A single ALTER TABLE that combines RENAME TO with ADD FOREIGN KEY fails with an old-table-name lookup in either clause order. Post-DDL foreign key validation now uses the final table name. Ordered foreign key catalog additions/deletions retain their original identity, then table-name updates run last so new, existing, incoming, and self references publish the final identity together.
The change stays within the INPLACE planner and preserves the existing execution and transaction boundaries. Invalid existing rows reject the ALTER and roll back the rename, constraint changes, and catalog changes. It adds one bounded scan of ALTER options with no additional catalog SQL executions.
Validation on macOS arm64, Go 1.27.1, CPU native build:
pkg/sql/planpackage passed; focused coverage includes both clause orders, ordered constraint replacement/add-drop, quoted composite self references, incoming/outgoing metadata, FK enforcement, rollback, no-op renames, and checks-disabled planner controls. Existing self-reference catalog regression also passed.foreign_key/fk_alter_rename.sqlpassed normal mo-tester comparison twice on the same test-owned single-CN instance (26/26 statements each); database and FK catalog teardown were verified after each run.CI remains pending. The issue should remain open after merge for reporter verification.