Skip to main content
Scalar function
NULL input values become NULL elements; the constructed array is non-NULL.

Syntax

Scalar

Arguments

Returns

  • Type: ARRAY<T>
  • Possible values: The values converted to a common element type.
  • NULL behavior: NULL input values become NULL elements; the constructed array is non-NULL.
  • Shape: T is the common SQL type of the value arguments: BOOLEAN, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL(p, s), STRING, BINARY, DATE, TIME, TIMESTAMP, ARRAY, MAP or STRUCT. All concrete arguments must have this type after type conversion; the result preserves nested element and field types.
  • Ordering: Argument order.

Properties

Usage notes

  • With no arguments, the result is an empty ARRAY<NULL>. NULL-only inputs produce NULL elements. When a typed value is present, NULL elements take that value’s type. Nested arrays remain separate array elements; they are not joined together.
  • 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

Create an empty array

Limitations

  • All non-NULL values must have compatible types. Use explicit casts for mixed numeric types. Cast NULL to a specific type when you need a predictable array element type.
Last modified on November 3, 2026