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 exampleSELECT IS_STRUCT(PARSE_JSON('{"name": "Alice", "age": 30}'))
-- TRUE
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.
| Input | Result |
|---|---|
| VARIANT struct | TRUE |
| VARIANT other type | FALSE |
| VARIANT null | FALSE |
| SQL NULL | NULL |