diff --git a/dbms/tests/queries/0_stateless/00083_create_merge_tree_zookeeper.reference b/dbms/tests/queries/0_stateless/00083_create_merge_tree_zookeeper.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dbms/tests/queries/0_stateless/00084_summing_merge_tree.reference b/dbms/tests/queries/0_stateless/00084_summing_merge_tree.reference new file mode 100644 index 00000000000..7142e1ca063 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00084_summing_merge_tree.reference @@ -0,0 +1,4 @@ +2000-01-01 Goodbye 1 2 3 +2000-01-01 Hello 5 7 9 +2000-01-01 Goodbye 1 2 3 +2000-01-01 Hello 1 7 9 diff --git a/dbms/tests/queries/0_stateless/00084_summing_merge_tree.sql b/dbms/tests/queries/0_stateless/00084_summing_merge_tree.sql new file mode 100644 index 00000000000..b73fa77ae7d --- /dev/null +++ b/dbms/tests/queries/0_stateless/00084_summing_merge_tree.sql @@ -0,0 +1,29 @@ +DROP TABLE IF EXISTS test.summing_merge_tree; + +CREATE TABLE test.summing_merge_tree (d Date, a String, x UInt32, y UInt64, z Float64) ENGINE = SummingMergeTree(d, a, 8192); + +INSERT INTO test.summing_merge_tree VALUES ('2000-01-01', 'Hello', 1, 2, 3); +INSERT INTO test.summing_merge_tree VALUES ('2000-01-01', 'Hello', 4, 5, 6); +INSERT INTO test.summing_merge_tree VALUES ('2000-01-01', 'Goodbye', 1, 2, 3); + +OPTIMIZE TABLE test.summing_merge_tree; +OPTIMIZE TABLE test.summing_merge_tree; +OPTIMIZE TABLE test.summing_merge_tree; + +SELECT * FROM test.summing_merge_tree ORDER BY d, a, x, y, z; + + +DROP TABLE IF EXISTS test.summing_merge_tree; + +CREATE TABLE test.summing_merge_tree (d Date, a String, x UInt32, y UInt64, z Float64) ENGINE = SummingMergeTree(d, a, 8192, (y, z)); + +INSERT INTO test.summing_merge_tree VALUES ('2000-01-01', 'Hello', 1, 2, 3); +INSERT INTO test.summing_merge_tree VALUES ('2000-01-01', 'Hello', 4, 5, 6); +INSERT INTO test.summing_merge_tree VALUES ('2000-01-01', 'Goodbye', 1, 2, 3); + +OPTIMIZE TABLE test.summing_merge_tree; +OPTIMIZE TABLE test.summing_merge_tree; +OPTIMIZE TABLE test.summing_merge_tree; + +SELECT * FROM test.summing_merge_tree ORDER BY d, a, x, y, z; +