-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Materialized view require all columns to be provided #7878
Labels
Comments
The issue is caused by
|
Simple test case $ cat 01069_materialized_view_alter_target_table.sql
DROP TABLE IF EXISTS mv_source;
DROP TABLE IF EXISTS mv_target;
CREATE TABLE mv_source (`a` UInt64) ENGINE = MergeTree ORDER BY tuple();
CREATE TABLE mv_target (`a` UInt64) ENGINE = MergeTree ORDER BY tuple();
CREATE MATERIALIZED VIEW mv TO mv_target AS SELECT * FROM mv_source;
INSERT INTO mv_source VALUES (1);
ALTER TABLE mv_target ADD COLUMN b UInt8;
INSERT INTO mv_source VALUES (1);
SELECT * FROM mv;
SELECT * FROM mv_target; The expected output $ cat 01069_materialized_view_alter_target_table.reference
1
1
1 0
1 0 |
vzakaznikov
pushed a commit
to vzakaznikov/ClickHouse
that referenced
this issue
Jan 21, 2020
Merged
KochetovNicolai
added a commit
that referenced
this issue
Jan 22, 2020
filimonov
pushed a commit
to filimonov/ClickHouse
that referenced
this issue
Feb 4, 2020
filimonov
pushed a commit
to filimonov/ClickHouse
that referenced
this issue
Feb 4, 2020
filimonov
pushed a commit
to filimonov/ClickHouse
that referenced
this issue
Feb 4, 2020
Fixed in #8788 in version 19.16.13 on newer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
That works:
And when I add a column to mv_target it stops working (i expect to use the default value in that case)
The text was updated successfully, but these errors were encountered: