assumeNotNull
Introduced in: v1.1.0 Returns the corresponding non-Nullable value for a value of type Nullable.
If the original value is NULL, an arbitrary result can be returned.
See also: functions ifNull and coalesce.
Syntax
x— The original value of any nullable type.Nullable(T)
NULL, otherwise an arbitrary value, if the input value is NULL. Any
Examples
Usage example
Query
Response
coalesce
Introduced in: v1.1.0 Returns the leftmost non-NULL argument.
Syntax
x[, y, ...]— Any number of parameters of non-compound type. All parameters must be of mutually compatible data types.Any
NULL argument, otherwise NULL, if all arguments are NULL. Any or NULL
Examples
Usage example
Query
Response
firstNonDefault
Introduced in: v25.9.0 Returns the first non-default value from a set of arguments Syntaxarg1— The first argument to check -arg2— The second argument to check -...— Additional arguments to check
Query
Response
Query
Response
Query
Response
Query
Response
ifNull
Introduced in: v1.1.0 Returns an alternative value if the first argument isNULL.
Syntax
x if it is not NULL, otherwise alt. Any
Examples
Usage example
Query
Response
isNotNull
Introduced in: v1.1.0 Checks if the argument is notNULL.
Also see: operator IS NOT NULL.
Syntax
x— A value of non-compound data type.Any
1 if x is not NULL, otherwise 0. UInt8
Examples
Usage example
Query
Response
isNull
Introduced in: v1.1.0 Checks if the argument isNULL.
Also see: operator IS NULL.
Syntax
x— A value of non-compound data type.Any
1 if x is NULL, otherwise 0. UInt8
Examples
Usage example
Query
Response
isNullable
Introduced in: v22.7.0 Checks whether the argument’s data type isNullable (i.e it allows NULL values).
Syntax
x— A value of any data type.Any
1 if x is of a Nullable data type, otherwise 0. UInt8
Examples
Usage example
Query
Response
isZeroOrNull
Introduced in: v20.3.0 Checks if the argument is either zero (0) or NULL.
Syntax
x— A numeric value.UInt
1 if x is NULL or equal to zero, otherwise 0. UInt8/16/32/64 or Float32/Float64
Examples
Usage example
Query
Response
nullIf
Introduced in: v1.1.0 ReturnsNULL if both arguments are equal.
Syntax
NULL if both arguments are equal, otherwise returns the first argument. NULL or Nullable(x)
Examples
Usage example
Query
Response
toNullable
Introduced in: v1.1.0 Converts the provided argument type toNullable.
Syntax
x— A value of any non-compound type.Any
Nullable type. Nullable(Any)
Examples
Usage example
Query
Response