Add a test

This commit is contained in:
Alexey Milovidov 2024-10-23 18:48:55 +02:00
parent 3ab37e5565
commit f6d2c24373
2 changed files with 145 additions and 0 deletions

View File

@ -0,0 +1,110 @@
1
all_1_1_0
1
2
all_1_1_0
all_2_2_0
1
2
3
all_1_1_0
all_2_2_0
all_3_3_0
1
2
3
4
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
1
2
3
4
5
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
all_5_5_0
1
2
3
4
5
6
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
all_5_5_0
all_6_6_0
1
2
3
4
5
6
7
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
all_5_5_0
all_6_6_0
all_7_7_0
1
2
3
4
5
6
7
8
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
all_5_5_0
all_6_6_0
all_7_7_0
all_8_8_0
1
2
3
4
5
6
7
8
9
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
all_5_5_0
all_6_6_0
all_7_7_0
all_8_8_0
all_9_9_0
1
2
3
4
5
6
7
8
9
10
all_1_1_0
all_2_2_0
all_3_3_0
all_4_4_0
all_5_5_0
all_6_6_0
all_7_7_0
all_8_8_0
all_9_9_0
all_10_10_0

View File

@ -0,0 +1,35 @@
# This is a smoke test, it proves that the Trivial merge selector exists and does something.
DROP TABLE IF EXISTS test;
CREATE TABLE test (x UInt64) ENGINE = MergeTree ORDER BY x SETTINGS merge_selector_algorithm = 'Trivial';
INSERT INTO test VALUES (1);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (2);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (3);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (4);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (5);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (6);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (7);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (8);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (9);
SELECT x FROM test ORDER BY x;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();
INSERT INTO test VALUES (10);
SELECT x FROM test ORDER BY x;
OPTIMIZE TABLE test;
SELECT name FROM system.parts WHERE active AND table = 'test' AND database = currentDatabase();