You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jimexist (via GitHub)" <gi...@apache.org> on 2023/08/14 16:08:36 UTC

[GitHub] [arrow-datafusion] Jimexist commented on a diff in pull request #7274: Add isnan and iszero

Jimexist commented on code in PR #7274:
URL: https://github.com/apache/arrow-datafusion/pull/7274#discussion_r1293681085


##########
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:
   i didn't know there are `+NaN` and `-NaN`. i thought there's only one type of NaN and (they) are unordered. unlike +0 and -0 which are distinct.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org