tuple([value: storable]+) -> tuple

Bundles one row for the values dataset function. tuple(v1, v2, ...) does not produce a stored column value. Its arguments are consumed by values to fill one row of the resulting table.

Each argument is a cell: any storable expression that does not reference a column. A cell need not be a compile-time constant. Examples include literals, arithmetic, durations, calls such as parse_json, parse_isotime, and ipv4, and typed nulls such as int64_null(). Aggregation and window functions are rejected, because a cell has no row set to compute over. The number of arguments must match the number of column names declared by the enclosing values(...) call, and the cells in one column must share a single type.

tuple(...) is only meaningful as a row argument to the values dataset function. Its result is a synthetic type, not a column type.

Domain

This is a scalar function (calculates a single output value for a single input row).

Categories

Examples

@t <- values("id", "name", tuple(1, "ada"), tuple(2, "alan"), tuple(3, "grace"))

Each tuple(...) supplies one row for the enclosing values dataset function. The number of arguments equals the number of column names, and the cells in one column share a single type.


Did this page help you?