From 368b45670b8e84b40d8a13e811a12942973a3c91 Mon Sep 17 00:00:00 2001 From: vdimir Date: Wed, 13 Nov 2024 14:35:17 +0000 Subject: [PATCH] add test 03248_max_parts_to_move --- .../03248_max_parts_to_move.reference | 0 .../0_stateless/03248_max_parts_to_move.sql | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/queries/0_stateless/03248_max_parts_to_move.reference create mode 100644 tests/queries/0_stateless/03248_max_parts_to_move.sql diff --git a/tests/queries/0_stateless/03248_max_parts_to_move.reference b/tests/queries/0_stateless/03248_max_parts_to_move.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/03248_max_parts_to_move.sql b/tests/queries/0_stateless/03248_max_parts_to_move.sql new file mode 100644 index 00000000000..aed41021e94 --- /dev/null +++ b/tests/queries/0_stateless/03248_max_parts_to_move.sql @@ -0,0 +1,23 @@ +DROP TABLE IF EXISTS t; +DROP TABLE IF EXISTS t2; + +CREATE TABLE t (x Int32) ENGINE = MergeTree ORDER BY x; +CREATE TABLE t2 (x Int32) ENGINE = MergeTree ORDER BY x; + +SYSTEM STOP MERGES t; + +SET max_insert_block_size = 1; +SET min_insert_block_size_rows = 1; +SET max_block_size = 1; + +SET max_parts_to_move = 5; +INSERT INTO t SELECT number from numbers(10); + +ALTER TABLE t MOVE PARTITION tuple() TO TABLE t2; -- { serverError TOO_MANY_PARTS } + +SET max_parts_to_move = 15; + +ALTER TABLE t MOVE PARTITION tuple() TO TABLE t2; + +DROP TABLE IF EXISTS t; +DROP TABLE IF EXISTS t2;