ClickHouse/tests/queries/0_stateless/01020_function_array_compact.sql
2022-02-21 15:40:03 +03:00

12 lines
378 B
SQL

select arrayCompact([0]);
select arrayCompact([1]);
select arrayCompact([2]);
select arrayCompact([1,1]);
select arrayCompact([1,2]);
select arrayCompact([1,1,2]);
select arrayCompact([1,2,1]);
select arrayCompact([2,1,1]);
select arrayCompact([1,2,2,3,3,3,4,4,4,4,5,5,5,5,5]);
SELECT arrayCompact(arrayMap(x->0, [NULL]));
SELECT toString(arrayCompact(arrayMap(x->0, [NULL])));