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/08/04 12:43:05 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #10722: ARROW-13344: [R] Initial bindings for ExecPlan/ExecNode

nealrichardson commented on a change in pull request #10722:
URL: https://github.com/apache/arrow/pull/10722#discussion_r682578342



##########
File path: r/R/dplyr-summarize.R
##########
@@ -28,14 +28,107 @@ summarise.arrow_dplyr_query <- function(.data, ..., .engine = c("arrow", "duckdb
     dplyr::group_vars(.data) # vars needed for grouping
   ))
   .data <- dplyr::select(.data, vars_to_keep)
-
   if (match.arg(.engine) == "duckdb") {
     dplyr::summarise(to_duckdb(.data), ...)
-  } else {
-    if (query_on_dataset(.data)) {
-      not_implemented_for_dataset("summarize()")
+  } else if (isTRUE(getOption("arrow.summarize", FALSE))) {
+    # Try stuff, if successful return()
+    out <- try(do_arrow_summarize(.data, ...), silent = TRUE)
+    if (inherits(out, "try-error")) {
+      return(abandon_ship(call, .data, format(out)))
+    } else {
+      return(out)
     }
+  } else {
+    # If unsuccessful or if option not set, do the work in R
     dplyr::summarise(dplyr::collect(.data), ...)

Review comment:
       Maybe so but it doesn't in the released version, and we'll be deleting this else case before release




-- 
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