mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
dbms: improved tests [#METR-2944].
This commit is contained in:
parent
3dc00a1298
commit
53fc3b7cd2
@ -28,6 +28,4 @@ CREATE TABLE array_element_test (id Int32) ENGINE = Memory;
|
||||
insert into array_element_test VALUES (-2), (1), (-4), (3), (2), (-1), (4), (-3), (0);
|
||||
select [1, 2, 3] as arr, arr[id] from array_element_test;
|
||||
|
||||
DROP TABLE IF EXISTS array_element_test;
|
||||
|
||||
|
||||
DROP TABLE array_element_test;
|
||||
|
@ -60,3 +60,5 @@ SELECT d,
|
||||
FROM test.stored_aggregates
|
||||
GROUP BY d
|
||||
ORDER BY d;
|
||||
|
||||
DROP TABLE test.stored_aggregates;
|
||||
|
@ -2,3 +2,4 @@ DROP TABLE IF EXISTS test.insert_fewer_columns;
|
||||
CREATE TABLE test.insert_fewer_columns (a UInt8, b UInt8) ENGINE = Memory;
|
||||
INSERT INTO test.insert_fewer_columns (a) VALUES (1), (2);
|
||||
SELECT * FROM test.insert_fewer_columns;
|
||||
DROP TABLE test.insert_fewer_columns;
|
||||
|
@ -7,3 +7,4 @@ CREATE TABLE test_show_tables.B (A UInt8) ENGINE = TinyLog;
|
||||
|
||||
SHOW TABLES from test_show_tables;
|
||||
|
||||
DROP DATABASE test_show_tables;
|
||||
|
@ -4,6 +4,25 @@ DROP TABLE IF EXISTS test.summing_merge_tree;
|
||||
DROP TABLE IF EXISTS test.summing_merge_tree_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.aggregating_merge_tree;
|
||||
|
||||
DROP TABLE IF EXISTS test.merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.collapsing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.summing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.summing_merge_tree_with_sampling_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.aggregating_merge_tree_with_sampling;
|
||||
|
||||
DROP TABLE IF EXISTS test.replicated_merge_tree;
|
||||
DROP TABLE IF EXISTS test.replicated_collapsing_merge_tree;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.replicated_aggregating_merge_tree;
|
||||
|
||||
DROP TABLE IF EXISTS test.replicated_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.replicated_collapsing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree_with_sampling_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.replicated_aggregating_merge_tree_with_sampling;
|
||||
|
||||
|
||||
CREATE TABLE test.merge_tree
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = MergeTree(d, (a, b), 111);
|
||||
CREATE TABLE test.collapsing_merge_tree
|
||||
@ -15,13 +34,6 @@ CREATE TABLE test.summing_merge_tree_with_list_of_columns_to_sum
|
||||
CREATE TABLE test.aggregating_merge_tree
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = AggregatingMergeTree(d, (a, b), 111);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS test.merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.collapsing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.summing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.summing_merge_tree_with_sampling_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.aggregating_merge_tree_with_sampling;
|
||||
|
||||
CREATE TABLE test.merge_tree_with_sampling
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = MergeTree(d, sipHash64(a) + b, (a, sipHash64(a) + b), 111);
|
||||
CREATE TABLE test.collapsing_merge_tree_with_sampling
|
||||
@ -33,13 +45,6 @@ CREATE TABLE test.summing_merge_tree_with_sampling_with_list_of_columns_to_sum
|
||||
CREATE TABLE test.aggregating_merge_tree_with_sampling
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = AggregatingMergeTree(d, sipHash64(a) + b, (a, sipHash64(a) + b), 111);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS test.replicated_merge_tree;
|
||||
DROP TABLE IF EXISTS test.replicated_collapsing_merge_tree;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.replicated_aggregating_merge_tree;
|
||||
|
||||
CREATE TABLE test.replicated_merge_tree
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = ReplicatedMergeTree('/clickhouse/tables/01/replicated_merge_tree/', 'r1', d, (a, b), 111);
|
||||
CREATE TABLE test.replicated_collapsing_merge_tree
|
||||
@ -51,13 +56,6 @@ CREATE TABLE test.replicated_summing_merge_tree_with_list_of_columns_to_sum
|
||||
CREATE TABLE test.replicated_aggregating_merge_tree
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = ReplicatedAggregatingMergeTree('/clickhouse/tables/01/replicated_aggregating_merge_tree/', 'r1', d, (a, b), 111);
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS test.replicated_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.replicated_collapsing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree_with_sampling;
|
||||
DROP TABLE IF EXISTS test.replicated_summing_merge_tree_with_sampling_with_list_of_columns_to_sum;
|
||||
DROP TABLE IF EXISTS test.replicated_aggregating_merge_tree_with_sampling;
|
||||
|
||||
CREATE TABLE test.replicated_merge_tree_with_sampling
|
||||
(d Date, a String, b UInt8, x String, y Int8, z UInt32) ENGINE = ReplicatedMergeTree('/clickhouse/tables/01/replicated_merge_tree_with_sampling/', 'r1', d, sipHash64(a) + b, (a, sipHash64(a) + b), 111);
|
||||
CREATE TABLE test.replicated_collapsing_merge_tree_with_sampling
|
||||
@ -93,3 +91,28 @@ INSERT INTO test.replicated_collapsing_merge_tree_with_sampling VALUES ('2000-01
|
||||
INSERT INTO test.replicated_summing_merge_tree_with_sampling VALUES ('2000-01-01', 'Hello, world!', 123, 'xxx yyy', -123, 123456789);
|
||||
INSERT INTO test.replicated_summing_merge_tree_with_sampling_with_list_of_columns_to_sum VALUES ('2000-01-01', 'Hello, world!', 123, 'xxx yyy', -123, 123456789);
|
||||
INSERT INTO test.replicated_aggregating_merge_tree_with_sampling VALUES ('2000-01-01', 'Hello, world!', 123, 'xxx yyy', -123, 123456789);
|
||||
|
||||
|
||||
DROP TABLE test.merge_tree;
|
||||
DROP TABLE test.collapsing_merge_tree;
|
||||
DROP TABLE test.summing_merge_tree;
|
||||
DROP TABLE test.summing_merge_tree_with_list_of_columns_to_sum;
|
||||
DROP TABLE test.aggregating_merge_tree;
|
||||
|
||||
DROP TABLE test.merge_tree_with_sampling;
|
||||
DROP TABLE test.collapsing_merge_tree_with_sampling;
|
||||
DROP TABLE test.summing_merge_tree_with_sampling;
|
||||
DROP TABLE test.summing_merge_tree_with_sampling_with_list_of_columns_to_sum;
|
||||
DROP TABLE test.aggregating_merge_tree_with_sampling;
|
||||
|
||||
DROP TABLE test.replicated_merge_tree;
|
||||
DROP TABLE test.replicated_collapsing_merge_tree;
|
||||
DROP TABLE test.replicated_summing_merge_tree;
|
||||
DROP TABLE test.replicated_summing_merge_tree_with_list_of_columns_to_sum;
|
||||
DROP TABLE test.replicated_aggregating_merge_tree;
|
||||
|
||||
DROP TABLE test.replicated_merge_tree_with_sampling;
|
||||
DROP TABLE test.replicated_collapsing_merge_tree_with_sampling;
|
||||
DROP TABLE test.replicated_summing_merge_tree_with_sampling;
|
||||
DROP TABLE test.replicated_summing_merge_tree_with_sampling_with_list_of_columns_to_sum;
|
||||
DROP TABLE test.replicated_aggregating_merge_tree_with_sampling;
|
||||
|
@ -13,7 +13,7 @@ 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;
|
||||
DROP TABLE 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));
|
||||
|
||||
@ -27,3 +27,5 @@ OPTIMIZE TABLE test.summing_merge_tree;
|
||||
|
||||
SELECT * FROM test.summing_merge_tree ORDER BY d, a, x, y, z;
|
||||
|
||||
|
||||
DROP TABLE test.summing_merge_tree;
|
||||
|
Loading…
Reference in New Issue
Block a user