Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
31 additions
and
3 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
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
5 changes: 5 additions & 0 deletions
5
tests/queries/0_stateless/03001_data_version_column.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,5 @@ | ||
all_1_1_0 1 1 1 | ||
all_2_2_0 2 2 2 | ||
all_1_1_0_3 3 1 100 | ||
all_2_2_0_3 3 2 200 | ||
all_4_4_0 4 3 3 |
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,20 @@ | ||
DROP TABLE IF EXISTS t_data_version; | ||
|
||
CREATE TABLE t_data_version (a UInt64, b UInt64) ENGINE = MergeTree ORDER BY a; | ||
|
||
INSERT INTO t_data_version VALUES (1, 1); | ||
INSERT INTO t_data_version VALUES (2, 2); | ||
|
||
SELECT _part, _data_version, * FROM t_data_version ORDER BY a; | ||
|
||
ALTER TABLE t_data_version UPDATE b = a * 100 WHERE 1 SETTINGS mutations_sync = 2; | ||
|
||
SELECT _part, _data_version, * FROM t_data_version ORDER BY a; | ||
|
||
INSERT INTO t_data_version VALUES (3, 3); | ||
|
||
-- Check part pruning. | ||
SELECT _part, _data_version, * FROM t_data_version WHERE _data_version = 4 ORDER BY a SETTINGS max_rows_to_read = 1; | ||
|
||
DROP TABLE t_data_version; | ||
|