Note
This function is available from V4.6.0.
Syntax
ISNAN(number)
Purpose
This function determines whether the value of number is a "Not a Number" (NaN). It returns NULL (true) if the value is NaN, or 0 (false) otherwise.
Notice
This is a ClickHouse-compatible function. By default, it is not enabled. You must set the sql_func_extension_mode parameter to enable it. For more information, see sql_func_extension_mode.
Examples
Enable the ClickHouse extension function mode.
obclient> ALTER SYSTEM SET sql_func_extension_mode = "ClickHouse";Return 0.
obclient> SELECT ISNAN(1.5);The return result is as follows:
+------------+ | ISNAN(1.5) | +------------+ | 0 | +------------+ 1 row in setReturn
NULL.obclient> SELECT ISNAN(1/0);The return result is as follows:
+------------+ | ISNAN(1/0) | +------------+ | NULL | +------------+ 1 row in set
