mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Add test
This commit is contained in:
parent
dead1016d6
commit
e43193c6bd
@ -0,0 +1,34 @@
|
||||
1 1_0_0_0
|
||||
1 1_1_1_0
|
||||
2 2_0_0_0
|
||||
2 2_1_1_0
|
||||
3 3_0_0_0
|
||||
3 3_1_1_0
|
||||
1_14355437094738224306_13787256470990635983 1_0_0_0
|
||||
1_17983216555921492149_5760936842821699731 1_1_1_0
|
||||
2_1634837529432916016_162161181777289016 2_0_0_0
|
||||
2_18395937199097619006_2181172257097482775 2_1_1_0
|
||||
3_4778092615753783900_11373142689174075303 3_0_0_0
|
||||
3_8348517061570215292_12257924383974485573 3_1_1_0
|
||||
1 1_0_0_0
|
||||
1 1_1_1_0
|
||||
2 2_0_0_0
|
||||
2 2_1_1_0
|
||||
3 3_0_0_0
|
||||
3 3_1_1_0
|
||||
1_14355437094738224306_13787256470990635983 1_0_0_0
|
||||
1_17983216555921492149_5760936842821699731 1_1_1_0
|
||||
2_1634837529432916016_162161181777289016 2_0_0_0
|
||||
2_18395937199097619006_2181172257097482775 2_1_1_0
|
||||
3_4778092615753783900_11373142689174075303 3_0_0_0
|
||||
3_8348517061570215292_12257924383974485573 3_1_1_0
|
||||
1 1_0_0_0
|
||||
1 1_1_1_0
|
||||
2 2_0_0_0
|
||||
2 2_1_1_0
|
||||
3 3_0_0_0
|
||||
1_14355437094738224306_13787256470990635983 1_0_0_0
|
||||
1_17983216555921492149_5760936842821699731 1_1_1_0
|
||||
2_1634837529432916016_162161181777289016 2_0_0_0
|
||||
2_18395937199097619006_2181172257097482775 2_1_1_0
|
||||
3_4778092615753783900_11373142689174075303 3_0_0_0
|
@ -0,0 +1,33 @@
|
||||
DROP TABLE IF EXISTS partitioned_table;
|
||||
|
||||
CREATE TABLE partitioned_table (
|
||||
key UInt64,
|
||||
partitioner UInt8,
|
||||
value String
|
||||
)
|
||||
ENGINE ReplicatedMergeTree('/clickhouse/test/01650_drop_part_and_deduplication/partitioned_table', '1')
|
||||
ORDER BY key
|
||||
PARTITION BY partitioner;
|
||||
|
||||
SYSTEM STOP MERGES partitioned_table;
|
||||
|
||||
INSERT INTO partitioned_table VALUES (1, 1, 'A'), (2, 2, 'B'), (3, 3, 'C');
|
||||
INSERT INTO partitioned_table VALUES (11, 1, 'AA'), (22, 2, 'BB'), (33, 3, 'CC');
|
||||
|
||||
SELECT partition_id, name FROM system.parts WHERE table = 'partitioned_table' AND database = currentDatabase() ORDER BY name;
|
||||
|
||||
SELECT name, value FROM system.zookeeper WHERE path='/clickhouse/test/01650_drop_part_and_deduplication/partitioned_table/blocks/';
|
||||
|
||||
INSERT INTO partitioned_table VALUES (33, 3, 'CC'); -- must be deduplicated
|
||||
|
||||
SELECT partition_id, name FROM system.parts WHERE table = 'partitioned_table' AND database = currentDatabase() ORDER BY name;
|
||||
|
||||
SELECT name, value FROM system.zookeeper WHERE path='/clickhouse/test/01650_drop_part_and_deduplication/partitioned_table/blocks/';
|
||||
|
||||
ALTER TABLE partitioned_table DROP PART '3_1_1_0';
|
||||
|
||||
SELECT partition_id, name FROM system.parts WHERE table = 'partitioned_table' AND database = currentDatabase() ORDER BY name;
|
||||
|
||||
SELECT name, value FROM system.zookeeper WHERE path='/clickhouse/test/01650_drop_part_and_deduplication/partitioned_table/blocks/';
|
||||
|
||||
DROP TABLE IF EXISTS partitioned_table;
|
Loading…
Reference in New Issue
Block a user