ARRAY functions
MaxCompute supports four complex data types: ARRAY, MAP, STRUCT, and JSON. The following table lists the available ARRAY functions.
|
Function |
Description |
|
Checks whether all elements in an ARRAY meet a specified condition. |
|
|
Checks whether any element in an ARRAY meets a specified condition. |
|
|
Constructs an ARRAY with the given values. |
|
|
Checks whether the specified ARRAY contains the specified value. |
|
|
Removes duplicate elements from an ARRAY. |
|
|
Returns deduplicated elements present in ARRAY A but not in ARRAY B. |
|
|
Calculates the intersection of two ARRAYs. |
|
|
Joins ARRAY elements into a string with a specified delimiter. |
|
|
Returns the maximum value in an ARRAY. |
|
|
Returns the minimum value in an ARRAY. |
|
|
Returns an array with elements normalized according to the specified p-norm. |
|
|
Returns the position of the first occurrence of a specified element in an ARRAY. |
|
|
Aggregates elements in an ARRAY. |
|
|
Removes the specified element from an ARRAY. |
|
|
Returns an ARRAY with a specified element repeated N times. |
|
|
Sorts elements in an ARRAY. |
|
|
Returns the deduplicated union of two ARRAYs. |
|
|
Checks whether two ARRAYs contain the same elements. |
|
|
Merges multiple ARRAYs. |
|
|
Returns an array of N-tuples from input array elements. |
|
|
Concatenates ARRAYs or strings. |
|
|
Converts a single row into multiple rows. This is a user-defined table-valued function (UDTF). |
|
|
Filters elements in an ARRAY. |
|
|
Flattens a nested array into a single array. |
|
|
Returns the element at a specified position in an ARRAY. |
|
|
Returns an array of n-grams for specified array elements. |
|
|
Expands an ARRAY into rows, each with a zero-based index column and an element column. |
|
|
Returns an array with elements in reverse order. |
|
|
Generates an array from an expression. |
|
|
Returns an array with elements in random order. |
|
|
Returns the number of elements in an ARRAY. |
|
|
Returns a subarray of specified length starting from a given position. |
|
|
Sorts elements in an array. |
|
|
Transforms elements in an ARRAY. |
|
|
Merges two ARRAYs element-by-element by position. |