mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Add test for move partition
This commit is contained in:
parent
6fdedfc0e5
commit
395e71c7c2
@ -0,0 +1,4 @@
|
||||
10000000
|
||||
0
|
||||
5000000
|
||||
5000000
|
@ -0,0 +1,28 @@
|
||||
CREATE TABLE IF NOT EXISTS test_move_partition_src (
|
||||
pk UInt8,
|
||||
val UInt32
|
||||
) Engine = MergeTree()
|
||||
PARTITION BY pk
|
||||
ORDER BY (pk, val);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS test_move_partition_dest (
|
||||
pk UInt8,
|
||||
val UInt32
|
||||
) Engine = MergeTree()
|
||||
PARTITION BY pk
|
||||
ORDER BY (pk, val);
|
||||
|
||||
TRUNCATE TABLE test_move_partition_src;
|
||||
TRUNCATE TABLE test_move_partition_dest;
|
||||
|
||||
INSERT INTO test_move_partition_src SELECT number % 2, number FROM system.numbers LIMIT 10000000;
|
||||
|
||||
SELECT count() FROM test_move_partition_src;
|
||||
SELECT count() FROM test_move_partition_dest;
|
||||
|
||||
ALTER TABLE test_move_partition_src MOVE PARTITION 1 TO test_move_partition_dest;
|
||||
|
||||
SELECT count() FROM test_move_partition_src;
|
||||
SELECT count() FROM test_move_partition_dest;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user