mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Merge pull request #25250 from ClickHouse/add-test-11535
Add test for #11535
This commit is contained in:
commit
15f3ac9787
@ -0,0 +1,3 @@
|
|||||||
|
1
|
||||||
|
1
|
||||||
|
1
|
30
tests/queries/0_stateless/01908_with_unknown_column.sql
Normal file
30
tests/queries/0_stateless/01908_with_unknown_column.sql
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
select a
|
||||||
|
from (
|
||||||
|
with a+1 as aa,
|
||||||
|
sumIf(aa, b > 0) as aaif
|
||||||
|
select a, aaif
|
||||||
|
FROM (select 1 as a, 2 as b)
|
||||||
|
GROUP BY a
|
||||||
|
) as V;
|
||||||
|
|
||||||
|
select a
|
||||||
|
from (
|
||||||
|
with a+1 as aa
|
||||||
|
-- , sumIf(c, b > 0) as aaif
|
||||||
|
, sum(if(b>0,c,0)) as aaif2
|
||||||
|
select a, aaif2
|
||||||
|
FROM
|
||||||
|
(select 1 as a, 2 as b, 3 as c)
|
||||||
|
GROUP BY a
|
||||||
|
) as V;
|
||||||
|
|
||||||
|
select a
|
||||||
|
from (
|
||||||
|
with a+1 as aa
|
||||||
|
-- , sumIf(c, b > 0) as aaif
|
||||||
|
-- , sum(if(b>0,c,0)) as aaif2
|
||||||
|
select a, sumIf(c, b > 0) as aaif3
|
||||||
|
FROM
|
||||||
|
(select 1 as a, 2 as b, 3 as c)
|
||||||
|
GROUP BY a
|
||||||
|
) as V;
|
Loading…
Reference in New Issue
Block a user