ClickHouse/tests/queries/0_stateless/01015_array_split.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
854 B
MySQL
Raw Normal View History

2019-10-13 08:06:57 +00:00
SELECT arraySplit((x, y) -> y, [1, 2, 3, 4, 5], [1, 0, 0, 1, 0]);
SELECT arrayReverseSplit((x, y) -> y, [1, 2, 3, 4, 5], [1, 0, 0, 1, 0]);
SELECT arraySplit(x -> 0, [1, 2, 3, 4, 5]);
SELECT arrayReverseSplit(x -> 0, [1, 2, 3, 4, 5]);
SELECT arraySplit(x -> 1, [1, 2, 3, 4, 5]);
SELECT arrayReverseSplit(x -> 1, [1, 2, 3, 4, 5]);
SELECT arraySplit(x -> x % 2 = 1, [1, 2, 3, 4, 5]);
SELECT arrayReverseSplit(x -> x % 2 = 1, [1, 2, 3, 4, 5]);
SELECT arraySplit(x -> 0, []);
SELECT arrayReverseSplit(x -> 0, []);
SELECT arraySplit(x -> 1, []);
SELECT arrayReverseSplit(x -> 1, []);
2019-11-13 03:00:08 +00:00
SELECT arraySplit(x -> x, emptyArrayUInt8());
SELECT arrayReverseSplit(x -> x, emptyArrayUInt8());
2019-10-13 08:06:57 +00:00
SELECT arraySplit(x -> x % 2 = 1, [1]);
SELECT arrayReverseSplit(x -> x % 2 = 1, [1]);
SELECT arraySplit(x -> x % 2 = 1, [2]);
SELECT arrayReverseSplit(x -> x % 2 = 1, [2]);