ClickHouse/tests/queries/0_stateless/00556_array_intersect.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

16 lines
789 B
SQL

select arrayIntersect([], []);
select arrayIntersect([1], []);
select arrayIntersect([1], [1]);
select arrayIntersect([1, 2], [1, 3], [2, 3]);
select arrayIntersect([1, 2], [1, 3], [1, 4]);
select arrayIntersect([1, -1], [1]);
select arrayIntersect([1, -1], [Null, 1]);
select arrayIntersect([1, -1, Null], [Null, 1]);
select arrayIntersect(cast([1, 2] as Array(Nullable(Int8))), [1, 3]);
select arrayIntersect(CAST([1, -1] AS Array(Nullable(Int8))), [NULL, 1]);
select arrayIntersect([[1, 2], [1, 1]], [[2, 1], [1, 1]]);
select arrayIntersect([[1, 2, Null], [1, 1]], [[-2, 1], [1, 1]]);
select arrayIntersect([(1, ['a', 'b']), (Null, ['c'])], [(2, ['c', Null]), (1, ['a', 'b'])]);
select toTypeName(arrayIntersect([(1, ['a', 'b']), (Null, ['c'])], [(2, ['c', Null]), (1, ['a', 'b'])]));