mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 11:52:27 +00:00
22 lines
888 B
MySQL
22 lines
888 B
MySQL
|
SELECT 'ArrayFirstIndex constant predicate';
|
||
|
SELECT arrayFirstIndex(x -> 1, emptyArrayUInt8());
|
||
|
SELECT arrayFirstIndex(x -> 0, emptyArrayUInt8());
|
||
|
SELECT arrayFirstIndex(x -> 1, [1, 2, 3]);
|
||
|
SELECT arrayFirstIndex(x -> 0, [1, 2, 3]);
|
||
|
|
||
|
SELECT 'ArrayFirstIndex non constant predicate';
|
||
|
SELECT arrayFirstIndex(x -> x >= 2, emptyArrayUInt8());
|
||
|
SELECT arrayFirstIndex(x -> x >= 2, [1, 2, 3]);
|
||
|
SELECT arrayFirstIndex(x -> x >= 2, [1, 2, 3]);
|
||
|
|
||
|
SELECT 'ArrayLastIndex constant predicate';
|
||
|
SELECT arrayLastIndex(x -> 1, emptyArrayUInt8());
|
||
|
SELECT arrayLastIndex(x -> 0, emptyArrayUInt8());
|
||
|
SELECT arrayLastIndex(x -> 1, [1, 2, 3]);
|
||
|
SELECT arrayLastIndex(x -> 0, materialize([1, 2, 3]));
|
||
|
|
||
|
SELECT 'ArrayLastIndex non constant predicate';
|
||
|
SELECT arrayLastIndex(x -> x >= 2, emptyArrayUInt8());
|
||
|
SELECT arrayLastIndex(x -> x >= 2, [1, 2, 3]);
|
||
|
SELECT arrayLastIndex(x -> x >= 2, materialize([1, 2, 3]));
|