Skip to main content
ReferenceApplies to: Unified engine deployments
Expressions produce values from literals, columns, operators, functions, casts, and subqueries. The engine resolves types before execution. Sources and destinations can support a narrower type set than query expressions.

Scalar types

CHAR(n) and VARCHAR(n) are rejected because their length and padding semantics are not implemented. Numeric widening and common-type selection depend on the expression and session ANSI setting. Avoid relying on implicit string-to-number conversion for reusable SQL.

Literals

Text uses single quotes. Double a quote inside text. Numeric literals can include decimal points and exponents. TRUE, FALSE, and NULL are unquoted keywords. DATE and TIMESTAMP literals state their type explicitly.

CAST and TRY_CAST

CAST requests conversion and can fail when a value is invalid or outside the destination range. TRY_CAST returns NULL for a failed supported conversion. A cast can still be rejected before execution when the backend cannot preserve its semantics.
The generated item identifiers are text codes, so the numeric-code conversion demonstrates a NULL result. Native execution rejects floating-point-to-integer conversions whose rounding would differ from Unified’s required behavior.

Arrays, maps, and structs

ARRAY values contain one element type. MAP values contain keys and values; use non-null keys and a consistent value type. STRUCT values contain named fields that can have different types. struct(column, ...) derives field names from columns; expression fields receive generated names unless explicitly constructed with named fields.
Use nested functions for construction and access. The Native result path rejects some nested ARRAY/STRUCT result columns. These examples return scalar lengths and fields from nested expressions. Connector writes and nested casts have separate restrictions.

Parameters

Named values use :name; positional values use the supported submission surface’s bindings. An unbound placeholder is not a complete runnable query. Workload and notebook parameters supply values through their run controls. The reference examples use complete literal values so they can execute directly.
Last modified on November 4, 2026