2019-11-04 22:18:59 +00:00
|
|
|
SELECT arrayCompact([]);
|
|
|
|
SELECT arrayCompact([1, 1, nan, nan, 2, 2, 2]);
|
|
|
|
SELECT arrayCompact([1, 1, nan, nan, -nan, 2, 2, 2]);
|
|
|
|
SELECT arrayCompact([1, 1, NULL, NULL, 2, 2, 2]);
|
2020-08-18 19:16:53 +00:00
|
|
|
SELECT arrayCompact([1, 1, NULL, NULL, nan, nan, 2, 2, 2]);
|
2019-11-04 22:18:59 +00:00
|
|
|
SELECT arrayCompact(['hello', '', '', '', 'world', 'world']);
|
|
|
|
SELECT arrayCompact([[[]], [[], []], [[], []], [[]]]);
|
2022-02-21 12:40:03 +00:00
|
|
|
SELECT arrayCompact(arrayMap(x -> toString(intDiv(x, 3)), range(number))) FROM numbers(10);
|
|
|
|
SELECT arrayCompact(x -> x.2, groupArray((number, intDiv(number, 3) % 3))) FROM numbers(10);
|
|
|
|
SELECT arrayCompact(x -> x.2, groupArray((toString(number), toString(intDiv(number, 3) % 3)))) FROM numbers(10);
|
|
|
|
SELECT arrayCompact(x -> x.2, groupArray((toString(number), intDiv(number, 3) % 3))) FROM numbers(10);
|