forked from ClickHouse/ClickHouse
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First attempt to fix issue ClickHouse#7878
- Loading branch information
Showing
5 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
dbms/tests/queries/0_stateless/01069_materialized_view_alter_target_table.reference
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
1 | ||
1 | ||
2 | ||
3 | ||
1 0 | ||
1 0 | ||
2 0 | ||
3 0 |
15 changes: 15 additions & 0 deletions
15
dbms/tests/queries/0_stateless/01069_materialized_view_alter_target_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
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),(2),(3); | ||
|
||
SELECT * FROM mv ORDER BY a; | ||
SELECT * FROM mv_target ORDER BY a; |