mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Added a test from Kodieg #2680
This commit is contained in:
parent
73e3a7b662
commit
fc9c7680b0
1
dbms/tests/queries/0_stateless/00759_kodieg.reference
Normal file
1
dbms/tests/queries/0_stateless/00759_kodieg.reference
Normal file
@ -0,0 +1 @@
|
||||
[1,2,3,1,3] 2 [1,3]
|
4
dbms/tests/queries/0_stateless/00759_kodieg.sql
Normal file
4
dbms/tests/queries/0_stateless/00759_kodieg.sql
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT
|
||||
[1, 2, 3, 1, 3] AS a,
|
||||
indexOf(arrayReverse(arraySlice(a, 1, -1)), 3) AS offset_from_right,
|
||||
arraySlice(a, multiIf(offset_from_right = 0, 1, (length(a) - offset_from_right) + 1));
|
Loading…
Reference in New Issue
Block a user