Skip to main content
Returns whether a VARIANT value is a VARIANT null, such as a JSON null. A VARIANT null is a value: a field that exists and holds null. It is different from SQL NULL, which variant_query returns when the path does not exist. Use this function to tell the two cases apart.

Syntax

Parameters

  • variant_expr: the expression that represents the VARIANT object. This is typically a VARIANT column from an Iceberg table or a VARIANT value returned by variant_query.

Return value

Returns a BOOLEAN value:
  • true if the value is a VARIANT null.
  • false for any other value, and for SQL NULL. The function never returns NULL.

Examples

Example 1: Distinguish a field that holds null from a field that does not exist.
Example 2: Count rows whose field a exists and holds null.

keyword

IS_VARIANT_NULL,VARIANT