%md #### array_intersect(array<T>, array<T>): array<T> Returns an array of the elements in the intersection of the given two arrays, without duplicates.
array_intersect(array<T>, array<T>): array<T>
Returns an array of the elements in the intersection of the given two arrays, without duplicates.
Last refresh: Never
%md #### array_union(array<T>, array<T>): array<T> Returns an array of the elements in the union of the given two arrays, without duplicates.
array_union(array<T>, array<T>): array<T>
Returns an array of the elements in the union of the given two arrays, without duplicates.
Last refresh: Never
%md #### array_join(array<String>, String[, String]): String Concatenates the elements of the given array using the delimiter and an optional string to replace nulls. If no value is set for null replacement, any null value is filtered.
array_join(array<String>, String[, String]): String
Concatenates the elements of the given array using the delimiter and an optional string to replace nulls. If no value is set for null replacement, any null value is filtered.
Last refresh: Never
%md #### arrays_overlap(array<T>, array<T>): array<T> Returns true if array1 contains at least a non-null element present also in array2. If the arrays have no common element and they are both non-empty and either of them contains a null element null is returned, false otherwise.
arrays_overlap(array<T>, array<T>): array<T>
Returns true if array1 contains at least a non-null element present also in array2. If the arrays have no common element and they are both non-empty and either of them contains a null element null is returned, false otherwise.
Last refresh: Never
%md #### array_sort(array<T>): array<T> Sorts the input array in ascending order. The elements of the input array must be orderable. Null elements will be placed at the end of the returned array.
array_sort(array<T>): array<T>
Sorts the input array in ascending order. The elements of the input array must be orderable. Null elements will be placed at the end of the returned array.
Last refresh: Never
SELECT array_sort(array('b', 'd', null, 'c', 'a'));
Showing all 1 rows.
Last refresh: Never
%md #### concat(String, ...): String / concat(array<T>, ...): array<T> Returns the concatenation of col1, col2, ..., colN. This function works with strings, binary and compatible array columns.
concat(String, ...): String / concat(array<T>, ...): array<T>
Returns the concatenation of col1, col2, ..., colN.
This function works with strings, binary and compatible array columns.
Last refresh: Never
%md #### sequence(T, T[, T]): array<T> Generates an array of elements from start to stop (inclusive), incrementing by step. The type of the returned elements is the same as the type of argument expressions.
sequence(T, T[, T]): array<T>
Generates an array of elements from start to stop (inclusive), incrementing by step. The type of the returned elements is the same as the type of argument expressions.
Last refresh: Never
%md #### slice(array<T>, Int, Int): array<T> Subsets the given array starting from index start (or starting from the end if start is negative) with the specified length.
slice(array<T>, Int, Int): array<T>
Subsets the given array starting from index start (or starting from the end if start is negative) with the specified length.
Last refresh: Never
%md #### array_zip(array<T>, array<U>, ...): array<struct<T, U, ...>> Returns a merged array of structs in which the N-th struct contains all N-th values of input arrays.
array_zip(array<T>, array<U>, ...): array<struct<T, U, ...>>
Returns a merged array of structs in which the N-th struct contains all N-th values of input arrays.
Last refresh: Never
%md #### map_form_arrays(array<K>, array<V>): map<K, V> Creates a map with a pair of the given key/value arrays. All elements in keys should not be null.
map_form_arrays(array<K>, array<V>): map<K, V>
Creates a map with a pair of the given key/value arrays. All elements in keys should not be null.
Last refresh: Never
%md #### element_at(array<T>, Int): T / element_at(map<K, V>, K): V For arrays, returns an element of the given array at given (1-based) index. If index < 0, accesses elements from the last to the first. Returns null if the index exceeds the length of the array. For maps, returns a value for the given key, or null if the key is not contained in the map.
element_at(array<T>, Int): T / element_at(map<K, V>, K): V
For arrays, returns an element of the given array at given (1-based) index. If index < 0, accesses elements from the last to the first. Returns null if the index exceeds the length of the array.
For maps, returns a value for the given key, or null if the key is not contained in the map.
Last refresh: Never
%md #### cardinality(array<T>): Int / cardinality(map<K, V>): Int An alias of size. Returns the size of the given array or a map. Returns -1 if null.
cardinality(array<T>): Int / cardinality(map<K, V>): Int
An alias of size. Returns the size of the given array or a map. Returns -1 if null.
Last refresh: Never
%md #### transform(array<T>, function<T, U>): array<U> and transform(array<T>, function<T, Int, U>): array<U> Transform elements in an array using the function. If there are two arguments for the lambda function, the second argument means the index of the element.
transform(array<T>, function<T, U>): array<U> and transform(array<T>, function<T, Int, U>): array<U>
Transform elements in an array using the function.
If there are two arguments for the lambda function, the second argument means the index of the element.
Last refresh: Never
%md #### aggregate(array<T>, A, function<A, T, A>[, function<A, R>]): R Apply a binary operator to an initial state and all elements in the array, and reduces this to a single state. The final state is converted into the final result by applying a finish function.
aggregate(array<T>, A, function<A, T, A>[, function<A, R>]): R
Apply a binary operator to an initial state and all elements in the array, and reduces this to a single state. The final state is converted into the final result by applying a finish function.
Last refresh: Never
%md #### zip_with(array<T>, array<U>, function<T, U, R>): array<R> Merge the two given arrays, element-wise, into a single array using function. If one array is shorter, nulls are appended at the end to match the length of the longer array, before applying function.
zip_with(array<T>, array<U>, function<T, U, R>): array<R>
Merge the two given arrays, element-wise, into a single array using function. If one array is shorter, nulls are appended at the end to match the length of the longer array, before applying function.
Last refresh: Never
Apache Spark Built-in and Higher-Order Functions Examples
Last refresh: Never