2022-08-24 20:01:13 +00:00
|
|
|
-- array_length()
|
|
|
|
1
|
|
|
|
1
|
|
|
|
-- array_sum()
|
|
|
|
1
|
|
|
|
1
|
|
|
|
-- array_index_of()
|
|
|
|
3
|
|
|
|
1
|
|
|
|
-- array_iif()
|
|
|
|
[1,5,3]
|
|
|
|
[1,5,3]
|
|
|
|
[1,5,NULL]
|
2022-09-06 15:03:24 +00:00
|
|
|
[NULL,NULL,NULL]
|
2022-08-24 20:01:13 +00:00
|
|
|
-- array_concat()
|
|
|
|
[1,2,3,4,5,6]
|
2022-09-16 19:43:46 +00:00
|
|
|
-- array_reverse()
|
|
|
|
[]
|
|
|
|
[1]
|
|
|
|
[4,3,2,1]
|
|
|
|
['example','an','is','this']
|
|
|
|
-- array_rotate_left()
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[3,4,5,1,2]
|
|
|
|
[1,2,3,4,5]
|
|
|
|
[3,4,5,1,2]
|
|
|
|
[4,5,1,2,3]
|
|
|
|
[1,2,3,4,5]
|
|
|
|
[4,5,1,2,3]
|
|
|
|
-- array_rotate_right()
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[4,5,1,2,3]
|
|
|
|
[1,2,3,4,5]
|
|
|
|
[4,5,1,2,3]
|
|
|
|
[3,4,5,1,2]
|
|
|
|
[1,2,3,4,5]
|
|
|
|
[3,4,5,1,2]
|
|
|
|
-- array_shift_left()
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[3,4,5,NULL,NULL]
|
|
|
|
[NULL,NULL,1,2,3]
|
|
|
|
[3,4,5,-1,-1]
|
|
|
|
['c','','']
|
|
|
|
-- array_shift_right()
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[3,4,5,NULL,NULL]
|
|
|
|
[NULL,NULL,1,2,3]
|
|
|
|
[3,4,5,-1,-1]
|
|
|
|
['c','','']
|
2022-08-24 20:01:13 +00:00
|
|
|
-- array_slice()
|
|
|
|
[2,3]
|
2022-09-06 15:03:24 +00:00
|
|
|
[3,4]
|
2022-09-16 19:43:46 +00:00
|
|
|
-- array_split()
|
2022-08-24 20:01:13 +00:00
|
|
|
[[1],[2,3],[4,5]]
|
|
|
|
[[1,2],[3,4,5]]
|
|
|
|
[[1],[2,3],[4,5]]
|
|
|
|
[[1,2,3,4],[],[4,5]]
|
2022-09-06 15:03:24 +00:00
|
|
|
-- array_sort_asc()
|
2022-09-09 17:52:16 +00:00
|
|
|
[['a','c','c','d',NULL]]
|
|
|
|
[[1,2,3,4]]
|
|
|
|
['a','b','c']
|
|
|
|
[['p','q','r'],['hello','clickhouse','world']]
|
|
|
|
[[NULL,'a','c','c','d']]
|
|
|
|
[[NULL,'a','c','c','d']]
|
|
|
|
[[NULL,NULL,NULL]]
|
|
|
|
[1,2,3,NULL,NULL]
|
|
|
|
['a','e','b','c','d']
|
|
|
|
[['George','John','Paul','Ringo']]
|
|
|
|
[['blue','green','yellow',NULL,NULL]]
|
|
|
|
[[NULL,NULL,'blue','green','yellow']]
|
|
|
|
-- array_sort_desc()
|
|
|
|
[['d','c','c','a',NULL]]
|
|
|
|
[[4,3,2,1]]
|
|
|
|
['c','b','a']
|
|
|
|
[['r','q','p'],['world','clickhouse','hello']]
|
|
|
|
[[NULL,'d','c','c','a']]
|
2022-09-16 19:43:46 +00:00
|
|
|
[[NULL,'d','c','c','a']]
|
2022-09-09 17:52:16 +00:00
|
|
|
[[NULL,NULL,NULL]]
|
|
|
|
[3,2,1,NULL,NULL]
|
|
|
|
['d','c','b','e','a']
|
|
|
|
[['Ringo','Paul','John','George']]
|
|
|
|
[['yellow','green','blue',NULL,NULL]]
|
|
|
|
[[NULL,NULL,'yellow','green','blue']]
|
2022-09-16 19:43:46 +00:00
|
|
|
-- jaccard_index()
|
|
|
|
0.75
|
|
|
|
0
|
|
|
|
0
|
|
|
|
nan
|
|
|
|
0
|
|
|
|
0.75
|
|
|
|
0.25
|
|
|
|
-- pack_array()
|
|
|
|
1 2 4 [1,2,4]
|
|
|
|
['ab','0.0.0.42','4.2']
|
|
|
|
-- repeat()
|
|
|
|
[]
|
|
|
|
[1,1,1]
|
|
|
|
['asd','asd','asd']
|
|
|
|
[86400,86400,86400]
|
|
|
|
[true,true,true]
|
|
|
|
-- set_difference()
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[]
|
|
|
|
[4,5,6]
|
|
|
|
[4]
|
|
|
|
[1,3]
|
|
|
|
[1,2,3]
|
|
|
|
['d','s']
|
|
|
|
['Chewbacca','Han Solo']
|
|
|
|
-- set_has_element()
|
|
|
|
0
|
|
|
|
1
|
|
|
|
0
|
|
|
|
1
|
|
|
|
0
|
|
|
|
-- set_intersect()
|
|
|
|
[]
|
|
|
|
[1,2,3]
|
|
|
|
[1,2,3]
|
|
|
|
[]
|
|
|
|
[5]
|
|
|
|
[]
|
|
|
|
['a']
|
|
|
|
['Darth Vader']
|
|
|
|
-- set_union()
|
|
|
|
[]
|
|
|
|
[1,2,3]
|
|
|
|
[1,2,3,4,5,6]
|
|
|
|
[1,2,3,4]
|
|
|
|
[1,2,3,4,5]
|
|
|
|
[1,2,3]
|
|
|
|
['a','d','f','s']
|
|
|
|
['Chewbacca','Darth Sidious','Darth Vader','Han Solo']
|
|
|
|
-- zip()
|
|
|
|
[]
|
|
|
|
[[1,2],[3,4],[5,6]]
|
|
|
|
[['Darth','Vader','has a suit'],['Master','Yoda','doesn\'t have a suit']]
|
|
|
|
[[1,10],[2,20],[3,NULL]]
|
|
|
|
[[NULL,1],[NULL,2],[NULL,3]]
|