Skip to content

Array Functions ​

list_collect ​

Syntaxlist_collect(ARG)
Parameter DescriptionThe parameter involved in the calculation, optional types: any
Return TypeArray
DescriptionAggregation function that collects the ARG parameter into an array. (The return format is of array type. If you find it displayed as null, you can try converting it to a string type to view it.)
Examplelist_collect({f1}), returns: an array containing all values of the f1 field

list_collect_flatten ​

Syntaxlist_collect_flatten(ARR)
ParameterArray type parameter, optional type: Array
Return TypeArray
DescriptionAggregation function that collects and flattens the arr parameter into an array. (The return format is of array type. If you find it displayed as null, you can try converting it to a string type to view it.)
Examplelist_collect_flatten({f1}), returns: Collects all elements of the f1 array and combines them into a new array.

list_contains ​

Syntaxlist_contains(ARR1, ARR2)
Parameters1. Array 1, optional type: array;
2. Array 2, optional type: array
Return TypeBoolean
DescriptionDetermines whether arr1 contains all elements of arr2
Examplelist_contains([1, 2, 3], [2, 3]), returns: TRUE

list_count ​

Syntaxlist_count(ARR)
ParameterArray type parameter, optional type: Array
Return TypeNumber
DescriptionGet the length of the array
Examplelist_count([1, 2, 3]), returns: 3

list_distinct ​

Syntaxlist_distinct(ARR)
ParameterArray type parameter, optional type: Array
Return TypeArray
DescriptionRemoves duplicate elements from the array
Examplelist_distinct([1, 2, 2, 3]), returns: [1, 2, 3]

list_elements ​

Syntaxlist_elements(ARR)
ParameterArray type parameter, optional type: Array
Return TypeANY
DescriptionSplits all elements of the specified array into multiple rows
Examplelist_elements([1, 2, 3]), returns: 1, 2, 3 (displayed in separate rows)

list_except ​

Syntaxlist_except(ARR1, ARR2)
Parameters1. Array 1, optional type: array;
2. Array 2, optional type: array
Return TypeArray
DescriptionReturns the elements that exist in arr1 but do not exist in arr2
Examplelist_except([1, 2, 3], [2, 4]), returns: [1, 3]

list_get ​

Syntaxlist_get(ARR, INDEX)
Parameters1. Array type parameter, optional type: Array;
2. Index position, optional type: Number
Return TypeAny type
DescriptionRetrieves the element at the specified position in the array
Examplelist_get([10, 20, 30], 1), returns: 20 (when the index starts from 0)

list_in ​

Syntaxlist_in(ARR, ARG)
Parameters1. Array type parameter, optional type: Array;
2. Value to be checked, optional type: Any type
Return TypeBoolean
DescriptionDetermines whether the specified array contains the given arg value
Examplelist_in([1, 2, 3], 2), returns: TRUE

list_intersect ​

Syntaxlist_intersect(ARR1, ARR2)
Parameters1. Array 1, optional type: array;
2. Array 2, optional type: array
Return TypeArray
DescriptionCalculates the intersection of two arrays
Examplelist_intersect([1, 2, 3], [2, 3, 4]), returns: [2, 3]

list_lower ​

Syntaxlist_lower(ARR)
ParameterArray type parameter, optional type: Array
Return TypeNUMBER
DescriptionRetrieves the lower bound of the specified array
Examplelist_lower([1, 2, 3]), returns: 1 (usually the lower bound of an array starts from 1)

list_slice ​

Syntaxlist_slice(ARR, ARG1, ARG2)
Parameters1. Array type parameter, optional type: Array;
2. Lower bound index, optional type: Number;
3. Upper bound index, optional type: Number
Return TypeArray
DescriptionReturns a slice of arr between the specified lower bound arg1 and upper bound arg2
Examplelist_slice([1, 2, 3, 4], 1, 3), returns: [2, 3]

list_union ​

Syntaxlist_union(ARR1, ARR2)
Parameters1. Array 1, optional type: array;
2. Array 2, optional type: array
Return TypeArray
DescriptionComputes the union of two arrays
Examplelist_union([1, 2], [2, 3]), returns: [1, 2, 2, 3]

list_upper ​

Syntaxlist_upper(ARR)
ParameterArray type parameter, optional type: Array
Return TypeNUMBER
DescriptionRetrieves the upper bound of the specified array
Examplelist_upper([1, 2, 3]), returns: 3 (typically the upper bound of an array is its length)

set_collect ​

Syntaxset_collect(ARG)
ParameterThe parameter for calculation, optional types: any type
Return TypeArray
DescriptionAggregation function that collects the arg parameter into a deduplicated array. (The return format is of array type. If you find it displayed as null, you can try converting it to a string type to view.)
Exampleset_collect([1, 2, 2, 3]), returns: [1, 2, 3]

set_collect_flatten ​

Syntaxset_collect_flatten(ARR)
ParameterArray type parameter, optional type: Array
Return TypeArray
DescriptionAggregation function that collects and flattens the arr parameter into a deduplicated array. (The return format is of array type. If you find it displayed as null, you can try converting it to a string type for viewing.)
Exampleset_collect_flatten([[1, 2], [2, 3]]), returns: [1, 2, 3]

set_union ​

Syntaxset_union(ARR1, ARR2)
Parameters1. Array 1, optional type: array;
2. Array 2, optional type: array
Return TypeArray
DescriptionCalculates the deduplicated union of two arrays
Exampleset_union([1, 2], [2, 3]), returns: [1, 2, 3]

str_to_array ​

Syntaxstr_to_array(ARG1, ARG2)
Parameters1. Text type parameter, optional type: STRING;
2. Separator, optional type: STRING
Return TypeArray
DescriptionSplits the text arg1 into an array using the separator arg2
Examplestr_to_array('a,b,c', ','), returns: ["a", "b", "c"]

User Manual for Hengshi Analysis Platform