You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/21 21:40:01 UTC

[GitHub] [arrow] rok commented on a change in pull request #10032: ARROW-12185: [R] Bindings for any, all

rok commented on a change in pull request #10032:
URL: https://github.com/apache/arrow/pull/10032#discussion_r617897892



##########
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(!na.rm && a$null_count > 0 && !as.vector(result)){
+    Scalar$create(NA)

Review comment:
       Agreed. Made [ARROW-12499](https://issues.apache.org/jira/browse/ARROW-12499) to capture this.




-- 
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:
users@infra.apache.org