Fixed test

This commit is contained in:
millb 2019-09-26 17:44:04 +03:00
parent 259be751ee
commit ea013cf1a2

View File

@ -1,11 +1,12 @@
DROP TABLE IF EXISTs new_table_test;
DROP TABLE IF EXISTS new_table_test;
DROP TABLE IF EXISTS check_table_test;
CREATE TABLE IF NOT EXISTS new_table_test(name String) ENGINE = MergeTree Order By name;
CREATE TABLE IF NOT EXISTS check_table_test(value1 UInt64, value2 UInt64) ENGINE = MergeTree Order By tuple();
INSERT INTO check_table_test (value1) SELECT value from system.events WHERE event = 'Merge';
CREATE TABLE new_table_test(name String) ENGINE = MergeTree ORDER BY name;
INSERT INTO new_table_test VALUES ('test');
CREATE TABLE check_table_test(value1 UInt64, value2 UInt64) ENGINE = MergeTree ORDER BY tuple();
INSERT INTO check_table_test (value1) SELECT value FROM system.events WHERE event = 'Merge';
OPTIMIZE TABLE new_table_test FINAL;
INSERT INTO check_table_test (value2) SELECT value from system.events WHERE event = 'Merge';
INSERT INTO check_table_test (value2) SELECT value FROM system.events WHERE event = 'Merge';
SELECT count() FROM check_table_test WHERE value2 > value1;