From fa305b1a725c7bdaa2b2194fd8a70f6c2804dc9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Thu, 15 Jul 2021 15:11:16 +0200 Subject: [PATCH] Tests should work with joined_subquery_requires_alias --- .../queries/0_stateless/01947_mv_subquery.sql | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tests/queries/0_stateless/01947_mv_subquery.sql b/tests/queries/0_stateless/01947_mv_subquery.sql index d4d51c007ff..ae67e46e0ae 100644 --- a/tests/queries/0_stateless/01947_mv_subquery.sql +++ b/tests/queries/0_stateless/01947_mv_subquery.sql @@ -17,7 +17,7 @@ LEFT JOIN SELECT id, sum(delta) as deltas_sum FROM dst WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) GROUP BY id -) +) _a USING (id); -- Inserting 2 numbers should require 2 calls to sleep @@ -27,13 +27,13 @@ INSERT into src SELECT number + 100 as id, 1 FROM numbers(2); DESCRIBE ( SELECT '1947 #3 QUERY - TRUE', id, src.value - deltas_sum as delta - FROM src - LEFT JOIN + FROM src + LEFT JOIN ( SELECT id, sum(delta) as deltas_sum FROM dst WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) GROUP BY id - ) + ) _a USING (id) ) FORMAT Null; @@ -82,13 +82,13 @@ SELECT id, src.value - deltas_sum as delta FROM src - LEFT JOIN - ( - SELECT id, sum(delta) as deltas_sum FROM dst - WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) - GROUP BY id - ) - USING (id); +LEFT JOIN +( + SELECT id, sum(delta) as deltas_sum FROM dst + WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) + GROUP BY id +) _a +USING (id); -- Inserting 2 numbers should require 2 calls to sleep INSERT into src SELECT number + 200 as id, 1 FROM numbers(2); @@ -97,14 +97,14 @@ INSERT into src SELECT number + 200 as id, 1 FROM numbers(2); DESCRIBE ( SELECT '1947 #3 QUERY - FALSE', id, src.value - deltas_sum as delta - FROM src - LEFT JOIN - ( - SELECT id, sum(delta) as deltas_sum FROM dst - WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) - GROUP BY id - ) - USING (id) + FROM src + LEFT JOIN + ( + SELECT id, sum(delta) as deltas_sum FROM dst + WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) + GROUP BY id + ) _a + USING (id) ) FORMAT Null; SYSTEM FLUSH LOGS;