Skip to main content

Categories: Datatype, Variant Type

IS_STRUCT Preview

Returns TRUE if the input expression is a VARIANT<STRUCT>.

Syntax

IS_STRUCT(value VARIANT) → BOOLEAN

  • value: The VARIANT value to check.

Examples

IS_STRUCT example
SELECT IS_STRUCT(PARSE_JSON('{"name": "Alice", "age": 30}'))
-- TRUE
IS_STRUCT example
SELECT IS_STRUCT(PARSE_JSON('[1, 2, 3]'))
-- FALSE

Usage Notes

NULL handling for VARIANT inputs

If the input is SQL NULL (e.g., from a missing path), IS_STRUCT returns NULL.

InputResult
VARIANT structTRUE
VARIANT other typeFALSE
VARIANT nullFALSE
SQL NULLNULL