Added a test

This commit is contained in:
Alexey Milovidov 2019-11-05 01:18:59 +03:00
parent 979db8c965
commit 92824e14e7
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,16 @@
[]
[1,nan,nan,2]
[1,nan,nan,nan,2]
[1,NULL,2]
['hello','','world']
[[[]],[[],[]],[[]]]
[]
['0']
['0']
['0']
['0','1']
['0','1']
['0','1']
['0','1','2']
['0','1','2']
['0','1','2']

View File

@ -0,0 +1,7 @@
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]);
SELECT arrayCompact(['hello', '', '', '', 'world', 'world']);
SELECT arrayCompact([[[]], [[], []], [[], []], [[]]]);
SELECT arrayCompact(x -> toString(intDiv(x, 3)), range(number)) FROM numbers(10);