Skip to main content
Scalar function
Returns NULL for a NULL array. A NULL element is inserted as a NULL array element.

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: The input elements plus the added element.
  • NULL behavior: Returns NULL for a NULL array. A NULL element is inserted as a NULL array element.
  • Shape: The original length plus one.
  • Ordering: Original array order with the added element at the end.

Properties

Usage notes

  • 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

Append a string

Last modified on October 15, 2026