Scalar function
The struct itself is non-NULL; NULL values become NULL fields. Field names must be non-NULL.
Syntax
Scalar
Arguments
Returns
- Type: STRUCT
- Possible values: The named fields with their individual input types.
- NULL behavior: The struct itself is non-NULL; NULL values become NULL fields. Field names must be non-NULL.
- Shape: One field per name/value pair with the input value type.
- Ordering: Name/value argument pair order.
Properties
Usage notes
- Field order follows the name/value pairs, and each field preserves its value type. The constructed struct is non-NULL even if every field value is NULL.
- 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
Combine text, a number and a boolean
Limitations
- Requires an even argument count and at least one pair; names must be nonempty constant strings.
- Supply at least one name/value pair and an even number of arguments. Field names must be nonempty and unique. Name comparison is case-sensitive.
Last modified on October 15, 2026