diff --git a/tests/queries/0_stateless/01518_select_in_null.reference b/tests/queries/0_stateless/01518_select_in_null.reference new file mode 100644 index 00000000000..b76f42e9af4 --- /dev/null +++ b/tests/queries/0_stateless/01518_select_in_null.reference @@ -0,0 +1,80 @@ +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 diff --git a/tests/queries/0_stateless/01518_select_in_null.sql b/tests/queries/0_stateless/01518_select_in_null.sql new file mode 100644 index 00000000000..97061f6cde3 --- /dev/null +++ b/tests/queries/0_stateless/01518_select_in_null.sql @@ -0,0 +1,90 @@ +DROP TABLE IF EXISTS t1; + +CREATE TABLE t1 (`cA` String, `c1` String) ENGINE = MergeTree ORDER BY (cA, c1); + +insert into t1 select 'AAAAAAAAAAA', 'BBBBBB'; + +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); +select count() from t1 where c1 in (select 'BBBBBB' union all select null); + + +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); +select count() from t1 where cast(c1 as Nullable(String)) in (select 'BBBBBB' union all select null); + +DROP TABLE t1;