Support function isNaN
exmy opened this issue · comments
exmy commented
Use case
- support function isNaN
There is a slight difference between the isNaN
function in Spark and in CH.
For example, when running the following query:
select isNaN(cast('a' as double));
In Spark: false
In CH: Cannot parse string 'a' as Float64: syntax error at begin of string. Note: there are toFloat64OrZero and toFloat64OrNull functions, which returns zero/NULL instead of throwing exception
So we can replace the cast function with toFloat64OrZero
, which will return zero instead of throwing an error for invalid input values.