Scalar function
Skips NULL arrays; returns NULL only when every input array is NULL. NULL elements inside arrays are retained.
Syntax
Scalar
Arguments
Type notation used below:
- T is the array element type: BOOLEAN, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL(p, s), STRING, BINARY, DATE, TIME, TIMESTAMP, ARRAY, MAP or STRUCT.
Returns
- Type: ARRAY<T>
- Possible values: All elements of the non-NULL input arrays.
- NULL behavior: Skips NULL arrays; returns NULL only when every input array is NULL. NULL elements inside arrays are retained.
- Shape: The sum of non-NULL input lengths.
- Ordering: Argument order, retaining order within each array.
Properties
Usage notes
- Compatible element types are promoted to a common result type.
- Supply one or more arrays. Nested dimensions and compatible element types are combined as needed. Incompatible element types raise an error.
- INTEGER and INT mean the same type; STRING means VARCHAR text. NULL can be used with a supported type. Cast NULL explicitly when its type would otherwise be unclear.
Examples
Typical behavior
Join arrays of strings
Last modified on October 15, 2026