Fix LIVE VIEW tests

This commit is contained in:
Alexey Milovidov 2020-05-13 03:13:45 +03:00
parent d52f9d9785
commit 32ad64ae01
4 changed files with 7 additions and 3 deletions

View File

@ -14,3 +14,4 @@ SELECT sleep(2);
SHOW TABLES WHERE database=currentDatabase() and name LIKE 'lv';
DROP TABLE mt;
DROP TABLE lv;

View File

@ -17,3 +17,4 @@ SELECT * FROM lv;
DROP TABLE visits;
DROP TABLE visits_layer;
DROP TABLE lv;

View File

@ -4,12 +4,12 @@ DROP TABLE IF EXISTS lv;
DROP TABLE IF EXISTS visits;
DROP TABLE IF EXISTS visits_layer;
CREATE TABLE visits(StartDate Date) ENGINE MergeTree ORDER BY(StartDate);
CREATE TABLE visits_layer(StartDate Date) ENGINE Distributed(test_cluster_two_shards_localhost, currentDatabase(), 'visits', rand());
CREATE TABLE visits (StartDate Date) ENGINE MergeTree ORDER BY(StartDate);
CREATE TABLE visits_layer (StartDate Date) ENGINE Distributed(test_cluster_two_shards_localhost, currentDatabase(), 'visits', rand());
CREATE LIVE VIEW lv AS SELECT * FROM visits_layer ORDER BY StartDate;
CREATE TABLE visits_layer_lv(StartDate Date) ENGINE Distributed(test_cluster_two_shards_localhost, currentDatabase(), 'lv', rand());
CREATE TABLE visits_layer_lv (StartDate Date) ENGINE Distributed(test_cluster_two_shards_localhost, currentDatabase(), 'lv', rand());
INSERT INTO visits_layer (StartDate) VALUES ('2020-01-01');
INSERT INTO visits_layer (StartDate) VALUES ('2020-01-02');
@ -19,3 +19,4 @@ SELECT * FROM visits_layer_lv;
DROP TABLE visits;
DROP TABLE visits_layer;
DROP TABLE lv;

View File

@ -17,3 +17,4 @@ SELECT * FROM lv;
DROP TABLE visits;
DROP TABLE visits_layer;
DROP TABLE lv;