ClickHouse/tests/queries/0_stateless/01020_function_array_compact.sql
Azat Khuzhin 3c75844a79 Fix SIGSEGV for arrayCompact() with consts
arrayCompact() implements useDefaultImplementationForConstants() but it
is a no-op for FunctionArrayMapped, fix this.

CI report [1]:

  [1]: https://clickhouse-test-reports.s3.yandex.net/28890/baac2e561cfb05bc174f0bd25571e607d19c7463/fuzzer_asan/report.html#fail1
2021-09-11 22:39:20 +03:00

12 lines
358 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(x->0, [NULL]);
SELECT toString(arrayCompact(x->0, [NULL]));