Declaration
ISNAN(number)
Description
This function determines whether the numeric value number is "not a number" (NaN). If it is NaN, the function returns NULL (true); otherwise, it returns 0 (false).
Notice
This is a ClickHouse-compatible function. By default, it is not available. To use it, 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