This commit is contained in:
RogerYK 2022-01-26 20:30:15 +08:00
parent 6fab7ec882
commit 887eeddeb6
2 changed files with 29 additions and 33 deletions

View File

@ -217,12 +217,12 @@ arraySlice(arr1, -4, 2)
arraySlice(arr1, -4, -1)
[] 2 4 []
[] 2 4 []
[1,2,3,4,5] 2 4 []
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,2,3,4,5] 2 4 [2,3,4]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
arrayPushFront(arr1, 1)
[] [1]
[] [1]
@ -504,12 +504,12 @@ arraySlice(arr1, -4, 2)
arraySlice(arr1, -4, -1)
[] 2 4 []
[] 2 4 []
[1,2,3,4,5] 2 4 []
[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL]
[1,2,3,NULL,5,6,7] 2 4 [NULL,5]
[1,2,3,4,5,NULL,7] 2 4 [4,5]
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5]
[1,2,3,4,5] 2 4 [2,3,4]
[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL,6]
[1,2,3,NULL,5,6,7] 2 4 [NULL,5,6]
[1,2,3,4,5,NULL,7] 2 4 [4,5,NULL]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5,6]
arrayPushFront(arr1, 1)
[] [1]
[] [1]
@ -817,12 +817,12 @@ arraySlice(arr1, -4, 2)
arraySlice(arr1, -4, -1)
[] 2 4 []
[] 2 4 []
[1,2,3,4,5] 2 4 []
[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL]
[1,2,3,NULL,5,6,7] 2 4 [NULL,5]
[1,2,3,4,5,NULL,7] 2 4 [4,5]
[1,2,3,4,5,6,7] 2 4 [4,5]
[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5]
[1,2,3,4,5] 2 4 [2,3,4]
[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL,6]
[1,2,3,NULL,5,6,7] 2 4 [NULL,5,6]
[1,2,3,4,5,NULL,7] 2 4 [4,5,NULL]
[1,2,3,4,5,6,7] 2 4 [4,5,6]
[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5,6]
arrayPushFront(arr1, 1)
[] [1]
[] [1]
@ -1104,12 +1104,12 @@ arraySlice(arr1, -4, 2)
arraySlice(arr1, -4, -1)
[] 2 4 []
[] 2 4 []
['1','2','3','4','5'] 2 4 []
['1',NULL,'3','4',NULL,'6','7'] 2 4 ['4',NULL]
['1','2','3',NULL,'5','6','7'] 2 4 [NULL,'5']
['1','2','3','4','5',NULL,'7'] 2 4 ['4','5']
['1','2','3','4','5','6','7'] 2 4 ['4','5']
['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'5']
['1','2','3','4','5'] 2 4 ['2','3','4']
['1',NULL,'3','4',NULL,'6','7'] 2 4 ['4',NULL,'6']
['1','2','3',NULL,'5','6','7'] 2 4 [NULL,'5','6']
['1','2','3','4','5',NULL,'7'] 2 4 ['4','5',NULL]
['1','2','3','4','5','6','7'] 2 4 ['4','5','6']
['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'5','6']
arrayPushFront(arr1, 1)
[] ['1']
[] ['1']

View File

@ -38,9 +38,8 @@ create table t
l Int8,
r Int8
) engine = Memory;
insert into t
values ('abcdefgh', 2, -2),
('12345678', 3, -3);
insert into t(s, l, r)
values ('abcdefgh', 2, -2),('12345678', 3, -3);
select substring(s, 2, -2)
from t;
@ -61,8 +60,7 @@ create table t
r Int8
) engine = Memory;
insert into t
values ('abcdefgh', -2, -2),
('12345678', -3, -3);
values ('abcdefgh', -2, -2),('12345678', -3, -3);
select substring(s, -2, -2)
from t;
@ -83,8 +81,7 @@ create table t
r Int8
) engine = Memory;
insert into t
values ('abcdefgh', 2, -2),
('12345678', 3, -3);
values ('abcdefgh', 2, -2),('12345678', 3, -3);
select substring(s, 2, -2)
from t;
@ -105,8 +102,7 @@ create table t
r Int8
) engine = Memory;
insert into t
values ('abcdefgh', -2, -2),
('12345678', -3, -3);
values ('abcdefgh', -2, -2),('12345678', -3, -3);
select substring(s, -2, -2)
from t;