ianmcook commented on a change in pull request #10032:
URL: https://github.com/apache/arrow/pull/10032#discussion_r614334376
##########
File path: r/R/compute.R
##########
@@ -186,6 +186,32 @@ unique.ArrowDatum <- function(x, incomparables = FALSE,
...) {
call_function("unique", x)
}
+#' @export
+any.ArrowDatum <- function(..., na.rm = FALSE){
+
+ a <- collect_arrays_from_dots(list(...))
+ result <- call_function("any", a)
+
+ if(!as.vector(result) && a$null_count > 0 && !na.rm){
Review comment:
The case with `any` and `all` is different—it's about three-valued
logic, e.g. with the default `na.rm = FALSE`, `any(c(TRUE, NA))` returns `TRUE`
but `any(c(FALSE, NA))` returns `NA`
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]