ISNAN checks whether a floating-point number is NaN (Not a Number). It returns true if the value is NaN, and false otherwise. The function is similar to Double.isNaN() and Float.isNaN() in Java.
Limitations
ISNAN is supported only in Realtime Compute for Apache Flink that uses Ververica Runtime (VVR) 3.0.0 or later.
Syntax
BOOLEAN ISNAN(DOUBLE d)
BOOLEAN ISNAN(FLOAT f)Input parameters
| Parameter | Data type |
|---|---|
| d | DOUBLE |
| f | FLOAT |
Example
Test data (T1)
| d | f |
|---|---|
| 0.1 | 0.1 |
| 0 | 0 |
Test statement
SELECT
ISNAN(CAST(d AS DOUBLE)) AS d1,
ISNAN(CAST(f AS FLOAT)) AS d2
FROM T1;Test result
| d1 (BOOLEAN) | d2 (BOOLEAN) |
|---|---|
| false | false |
| false | false |