ClickHouse/tests/queries/0_stateless/02343_analyzer_lambdas_issue_28083.sql
2022-10-31 12:00:49 +00:00

18 lines
430 B
SQL

SET allow_experimental_analyzer = 1;
select so,
r
from
(select [('y',0),('n',1)] as cg,
if( arrayMap( x -> x.1, cg ) != ['y', 'n'], 'y', 'n') as so,
arrayFilter( x -> x.1 = so , cg) as r
);
select
r
from
(select [('y',0),('n',1)] as cg,
if( arrayMap( x -> x.1, cg ) != ['y', 'n'], 'y', 'n') as so,
arrayFilter( x -> x.1 = so , cg) as r
);