Tests should work with joined_subquery_requires_alias

This commit is contained in:
Raúl Marín 2021-07-15 15:11:16 +02:00
parent c2f0d7c514
commit fa305b1a72

View File

@ -17,7 +17,7 @@ LEFT JOIN
SELECT id, sum(delta) as deltas_sum FROM dst SELECT id, sum(delta) as deltas_sum FROM dst
WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001))
GROUP BY id GROUP BY id
) ) _a
USING (id); USING (id);
-- Inserting 2 numbers should require 2 calls to sleep -- Inserting 2 numbers should require 2 calls to sleep
@ -33,7 +33,7 @@ DESCRIBE ( SELECT '1947 #3 QUERY - TRUE',
SELECT id, sum(delta) as deltas_sum FROM dst SELECT id, sum(delta) as deltas_sum FROM dst
WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001))
GROUP BY id GROUP BY id
) ) _a
USING (id) USING (id)
) FORMAT Null; ) FORMAT Null;
@ -82,13 +82,13 @@ SELECT
id, id,
src.value - deltas_sum as delta src.value - deltas_sum as delta
FROM src FROM src
LEFT JOIN LEFT JOIN
( (
SELECT id, sum(delta) as deltas_sum FROM dst SELECT id, sum(delta) as deltas_sum FROM dst
WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001))
GROUP BY id GROUP BY id
) ) _a
USING (id); USING (id);
-- Inserting 2 numbers should require 2 calls to sleep -- Inserting 2 numbers should require 2 calls to sleep
INSERT into src SELECT number + 200 as id, 1 FROM numbers(2); INSERT into src SELECT number + 200 as id, 1 FROM numbers(2);
@ -103,7 +103,7 @@ DESCRIBE ( SELECT '1947 #3 QUERY - FALSE',
SELECT id, sum(delta) as deltas_sum FROM dst SELECT id, sum(delta) as deltas_sum FROM dst
WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001)) WHERE id IN (SELECT id FROM src WHERE not sleepEachRow(0.001))
GROUP BY id GROUP BY id
) ) _a
USING (id) USING (id)
) FORMAT Null; ) FORMAT Null;