Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new distributed DDL regression test intended to ensure the logical table identifier (rel_logical_id / “table_id”) remains stable across DDL operations (ALTER/TRUNCATE), addressing issue #23333.
Changes:
- Add a new SQL test case file covering ALTER/TRUNCATE and related DDL sequences.
- Add the corresponding expected output
.resultfile for the new test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/distributed/cases/ddl/table_id.sql | Introduces DDL/DML scenarios meant to validate table_id stability across ALTER/TRUNCATE. |
| test/distributed/cases/ddl/table_id.result | Captures expected outputs for the new table_id.sql test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| drop table if exists t1; | ||
| create table t1(id int primary key, v int); | ||
|
|
||
| alter table t1 add column v2 int; | ||
|
|
||
| -- DML: new column exists and is writable | ||
| insert into t1(id, v, v2) values (1, 10, 20); | ||
| select id, v, v2 from t1 order by id; |
There was a problem hiding this comment.
This test file is intended to verify that rel_logical_id (logical table_id) stays stable across ALTER/TRUNCATE, but none of the test cases actually reads mo_catalog.mo_tables.rel_logical_id before/after the DDL or asserts equality. As written, it only checks that DDL/DML succeeds, so it won’t catch the regression described in issue #23333. Please capture rel_logical_id (and optionally rel_id for TRUNCATE) into session variables before the DDL, then compare after the DDL (e.g., via SELECT @before = (SELECT rel_logical_id ...) AS logical_id_unchanged).
What type of PR is this?
Which issue(s) this PR fixes:
issue #23333
What this PR does / why we need it:
add alter/truncate cases