mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #34615 from Algunenano/test_19222
Add test for #19222
This commit is contained in:
commit
100389b92f
@ -0,0 +1,4 @@
|
||||
5000
|
||||
5000
|
||||
5000
|
||||
5000
|
41
tests/queries/0_stateless/02212_cte_and_table_alias.sql
Normal file
41
tests/queries/0_stateless/02212_cte_and_table_alias.sql
Normal file
@ -0,0 +1,41 @@
|
||||
-- https://github.com/ClickHouse/ClickHouse/issues/19222
|
||||
SET enable_global_with_statement = 1;
|
||||
|
||||
WITH t AS
|
||||
(
|
||||
SELECT number AS n
|
||||
FROM numbers(10000)
|
||||
)
|
||||
SELECT count(*)
|
||||
FROM t AS a
|
||||
WHERE a.n < 5000;
|
||||
|
||||
WITH t AS
|
||||
(
|
||||
SELECT number AS n
|
||||
FROM numbers(10000)
|
||||
)
|
||||
SELECT count(*)
|
||||
FROM t AS a
|
||||
WHERE t.n < 5000;
|
||||
|
||||
|
||||
SET enable_global_with_statement = 0;
|
||||
|
||||
WITH t AS
|
||||
(
|
||||
SELECT number AS n
|
||||
FROM numbers(10000)
|
||||
)
|
||||
SELECT count(*)
|
||||
FROM t AS a
|
||||
WHERE a.n < 5000;
|
||||
|
||||
WITH t AS
|
||||
(
|
||||
SELECT number AS n
|
||||
FROM numbers(10000)
|
||||
)
|
||||
SELECT count(*)
|
||||
FROM t AS a
|
||||
WHERE t.n < 5000;
|
Loading…
Reference in New Issue
Block a user