From 32ad64ae01bfbf45fcc1c6b5686c60a059ca5b39 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 13 May 2020 03:13:45 +0300 Subject: [PATCH] Fix LIVE VIEW tests --- .../0_stateless/00980_create_temporary_live_view.sql | 1 + .../0_stateless/01235_live_view_over_distributed.sql | 1 + .../01236_distributed_over_live_view_over_distributed.sql | 7 ++++--- ...w_over_distributed_with_subquery_select_table_alias.sql | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/queries/0_stateless/00980_create_temporary_live_view.sql b/tests/queries/0_stateless/00980_create_temporary_live_view.sql index 2dda5231e73..c19ebd1673d 100644 --- a/tests/queries/0_stateless/00980_create_temporary_live_view.sql +++ b/tests/queries/0_stateless/00980_create_temporary_live_view.sql @@ -14,3 +14,4 @@ SELECT sleep(2); SHOW TABLES WHERE database=currentDatabase() and name LIKE 'lv'; DROP TABLE mt; +DROP TABLE lv; diff --git a/tests/queries/0_stateless/01235_live_view_over_distributed.sql b/tests/queries/0_stateless/01235_live_view_over_distributed.sql index f3950c16002..dd9ff80f30e 100644 --- a/tests/queries/0_stateless/01235_live_view_over_distributed.sql +++ b/tests/queries/0_stateless/01235_live_view_over_distributed.sql @@ -17,3 +17,4 @@ SELECT * FROM lv; DROP TABLE visits; DROP TABLE visits_layer; +DROP TABLE lv; diff --git a/tests/queries/0_stateless/01236_distributed_over_live_view_over_distributed.sql b/tests/queries/0_stateless/01236_distributed_over_live_view_over_distributed.sql index 4408880ec5f..618bdc1c5d2 100644 --- a/tests/queries/0_stateless/01236_distributed_over_live_view_over_distributed.sql +++ b/tests/queries/0_stateless/01236_distributed_over_live_view_over_distributed.sql @@ -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; diff --git a/tests/queries/0_stateless/01237_live_view_over_distributed_with_subquery_select_table_alias.sql b/tests/queries/0_stateless/01237_live_view_over_distributed_with_subquery_select_table_alias.sql index dc57e001122..a572074de3c 100644 --- a/tests/queries/0_stateless/01237_live_view_over_distributed_with_subquery_select_table_alias.sql +++ b/tests/queries/0_stateless/01237_live_view_over_distributed_with_subquery_select_table_alias.sql @@ -17,3 +17,4 @@ SELECT * FROM lv; DROP TABLE visits; DROP TABLE visits_layer; +DROP TABLE lv;