Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: alter table add/drop column without updating the meta of indexes #8649

Closed
chenzl25 opened this issue Mar 20, 2023 · 0 comments · Fixed by #8664
Closed

bug: alter table add/drop column without updating the meta of indexes #8649

chenzl25 opened this issue Mar 20, 2023 · 0 comments · Fixed by #8664
Labels
type/bug Something isn't working
Milestone

Comments

@chenzl25
Copy link
Contributor

chenzl25 commented Mar 20, 2023

Describe the bug

dev=> create table t(id int primary key, a int, b varchar);
CREATE_TABLE
dev=> create index idx on t(a);
CREATE_INDEX
dev=> alter table t add column c int;
ALTER_TABLE
dev=> select * from t; // panic
dev=> create table t(id int primary key, a int, b varchar);
CREATE_TABLE
dev=> create index idx on t(b) include(b);
CREATE_INDEX
dev=> alter table t drop column a;
ALTER_TABLE
dev=> select * from t where b = '1'; // fail to select index
                    QUERY PLAN
--------------------------------------------------
 BatchExchange { order: [], dist: Single }
 └─BatchFilter { predicate: (t.b = '1':Varchar) }
   └─BatchScan { table: t, columns: [id, b] }

To Reproduce

No response

Expected behavior

No response

Additional context

No response

@chenzl25 chenzl25 added the type/bug Something isn't working label Mar 20, 2023
@github-actions github-actions bot added this to the release-0.19 milestone Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant