-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8806 from ClickHouse/vzakaznikov-issue_7878_3
Reworking fix for issue 7878 (version 4)
- Loading branch information
Showing
7 changed files
with
45 additions
and
26 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
1 change: 1 addition & 0 deletions
1
dbms/tests/queries/0_stateless/01023_materialized_view_query_context.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
1 change: 1 addition & 0 deletions
1
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DROP TABLE IF EXISTS mv; | ||
DROP TABLE IF EXISTS mv_source; | ||
DROP TABLE IF EXISTS mv_target; | ||
|
||
|
8 changes: 8 additions & 0 deletions
8
.../0_stateless/01069_materialized_view_alter_target_table_with_default_expression.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 2 | ||
1 2 | ||
2 3 | ||
3 4 |
16 changes: 16 additions & 0 deletions
16
...ueries/0_stateless/01069_materialized_view_alter_target_table_with_default_expression.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,16 @@ | ||
DROP TABLE IF EXISTS mv; | ||
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 DEFAULT a + 1; | ||
INSERT INTO mv_source VALUES (1),(2),(3); | ||
|
||
SELECT * FROM mv ORDER BY a; | ||
SELECT * FROM mv_target ORDER BY a; |