flatten( nested_list )
| Flatten a nested list by one level | flatten([[1, 2, 3], [4, 5]])
| [1, 2, 3, 4, 5]
| |
generate_series( start , stop , step )
| Create a list of values between start and stop - the stop parameter is inclusive | generate_series(2, 5, 3)
| [2, 5]
| |
list_aggregate( list , name )
| Executes the aggregate function name on the elements of list | list_aggregate([1, 2, NULL], 'min')
| 1
| array_aggregate , list_aggr , array_aggr , aggregate
|
list_cosine_similarity( list1 , list2 )
| Compute the cosine similarity between two lists | list_cosine_similarity([1, 2, 3], [1, 2, 3])
| 1.0
| <=>
|
list_distance( list1 , list2 )
| Compute the distance between two lists | list_distance([1, 2, 3], [1, 2, 3])
| 0.0
| <->
|
list_distinct( list )
| Removes all duplicates and NULLs from a list. Does not preserve the original order | list_distinct([1, 1, NULL, -3, 1, 5])
| [5, -3, 1]
| array_distinct
|
list_filter( list , lambda )
| Constructs a list from those elements of the input list for which the lambda function returns true | list_filter([3, 4, 5], x -> x > 4)
| [5]
| array_filter , filter
|
list_inner_product( list1 , list2 )
| Compute the inner product between two lists | list_inner_product([1, 2, 3], [1, 2, 3])
| 14.0
| list_dot_product , <#>
|
list_reverse_sort( list )
| Sorts the elements of the list in reverse order | list_reverse_sort([3, 6, 1, 2])
| [6, 3, 2, 1]
| array_reverse_sort
|
list_slice( list , begin , end[ , step] )
| Extract a sublist using slice conventions. Negative values are accepted | list_slice(l, 2, 4)
| | array_slice
|
list_sort( list )
| Sorts the elements of the list | list_sort([3, 6, 1, 2])
| [1, 2, 3, 6]
| array_sort
|
list_transform( list , lambda )
| Returns a list that is the result of applying the lambda function to each element of the input list. See the Lambda Functions section for more details | list_transform([1, 2, 3], x -> x + 1)
| [2, 3, 4]
| array_transform , list_apply , array_apply , apply
|
list_unique( list )
| Counts the unique elements of a list | list_unique([1, 1, NULL, -3, 1, 5])
| 3
| array_unique
|
list_value( any , ... )
| Create a LIST containing the argument values | list_value(4, 5, 6)
| [4, 5, 6]
| list_pack
|
range( start , stop , step )
| Create a list of values between start and stop - the stop parameter is exclusive | range(2, 5, 3)
| [2]
| |