2019-07-26 11:54:50 +00:00
|
|
|
DROP TABLE IF EXISTS test_move_partition_src;
|
|
|
|
DROP TABLE IF EXISTS test_move_partition_dest;
|
|
|
|
|
2019-07-26 10:05:19 +00:00
|
|
|
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);
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2019-09-17 11:59:09 +00:00
|
|
|
ALTER TABLE test_move_partition_src MOVE PARTITION 1 TO TABLE test_move_partition_dest;
|
2023-02-13 15:10:16 +00:00
|
|
|
ALTER TABLE test_move_partition_src MOVE PART '0_1_1_0' TO TABLE test_move_partition_dest; -- { clientError SYNTAX_ERROR }
|
2019-07-26 10:05:19 +00:00
|
|
|
|
|
|
|
SELECT count() FROM test_move_partition_src;
|
|
|
|
SELECT count() FROM test_move_partition_dest;
|
2019-07-26 11:54:50 +00:00
|
|
|
|
|
|
|
DROP TABLE test_move_partition_src;
|
|
|
|
DROP TABLE test_move_partition_dest;
|