Skip to content

add cases table_id#23831

Merged
heni02 merged 5 commits intomainfrom
add_cases_table_id
Mar 11, 2026
Merged

add cases table_id#23831
heni02 merged 5 commits intomainfrom
add_cases_table_id

Conversation

@heni02
Copy link
Copy Markdown
Collaborator

@heni02 heni02 commented Mar 10, 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 #23333

What this PR does / why we need it:

add alter/truncate cases

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .result file 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.

Comment on lines +7 to +14
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;
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot uses AI. Check for mistakes.
@heni02 heni02 merged commit d90a4f9 into main Mar 11, 2026
31 checks passed
@heni02 heni02 deleted the add_cases_table_id branch March 11, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants