ClickHouse/tests/queries/0_stateless/00206_empty_array_to_single.sql
Alexey Milovidov 1d5fc08f0b Fix some tests
2021-02-22 19:22:09 +03:00

9 lines
605 B
SQL

SELECT emptyArrayToSingle(arrayFilter(x -> x != 99, arrayJoin([[1, 2], [99], [4, 5, 6]])));
SELECT emptyArrayToSingle(emptyArrayString()), emptyArrayToSingle(emptyArrayDate()), emptyArrayToSingle(arrayMap(x -> toTimeZone(x, 'Europe/Moscow'), emptyArrayDateTime()));
SELECT
emptyArrayToSingle(range(number % 3)),
emptyArrayToSingle(arrayMap(x -> toString(x), range(number % 2))),
emptyArrayToSingle(arrayMap(x -> toDateTime('2015-01-01 00:00:00', 'UTC') + x, range(number % 5))),
emptyArrayToSingle(arrayMap(x -> toDate('2015-01-01') + x, range(number % 4))) FROM system.numbers LIMIT 10;