tustvold commented on code in PR #7274: URL: https://github.com/apache/arrow-datafusion/pull/7274#discussion_r1293856601
########## datafusion/expr/src/expr_fn.rs: ########## @@ -811,6 +811,18 @@ scalar_expr!(CurrentDate, current_date, ,"returns current UTC date as a [`DataTy scalar_expr!(Now, now, ,"returns current timestamp in nanoseconds, using the same value for all instances of now() in same statement"); scalar_expr!(CurrentTime, current_time, , "returns current UTC time as a [`DataType::Time64`] value"); scalar_expr!(Nanvl, nanvl, x y, "returns x if x is not NaN otherwise returns y"); +scalar_expr!( + Isnan, + isnan, + num, + "returns true if a given number is +NaN or -NaN otherwise returns false" Review Comment: Any value with an exponent field of all 1s is a Nan, and so there are 2^N distinct values of NaN, where N is the number of mantissa bits. Within arrow-rs we follow the IEEE 754 total order predicate which establishes an ordering for NaNs, (and infinity, etc...) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
