Type Predicate Functions
This section provides reference information for type predicate functions in Databend. These functions enable type checking, validation, and conversion of JSON values.
Type Checking
Function | Description | Example |
---|---|---|
IS_ARRAY | Checks if a JSON value is an array | IS_ARRAY('[1,2,3]') → true |
IS_OBJECT | Checks if a JSON value is an object | IS_OBJECT('{"key":"value"}') → true |
IS_STRING | Checks if a JSON value is a string | IS_STRING('"hello"') → true |
IS_INTEGER | Checks if a JSON value is an integer | IS_INTEGER('42') → true |
IS_FLOAT | Checks if a JSON value is a floating-point number | IS_FLOAT('3.14') → true |
IS_BOOLEAN | Checks if a JSON value is a boolean | IS_BOOLEAN('true') → true |
IS_NULL_VALUE | Checks if a JSON value is null | IS_NULL_VALUE('null') → true |