ClickHouse/dbms/tests/queries/0_stateless/00688_low_cardinality_in.sql

11 lines
483 B
SQL

drop table if exists lc;
create table lc (str StringWithDictionary, val UInt8WithDictionary) engine = MergeTree order by tuple();
insert into lc values ('a', 1), ('b', 2);
select str, str in ('a', 'd') from lc;
select val, val in (1, 3) from lc;
select str, str in (select arrayJoin(['a', 'd'])) from lc;
select val, val in (select arrayJoin([1, 3])) from lc;
select str, str in (select str from lc) from lc;
select val, val in (select val from lc) from lc;
drop table if exists lc;