ianmcook commented on a change in pull request #11018:
URL: https://github.com/apache/arrow/pull/11018#discussion_r713473181



##########
File path: r/R/dplyr-summarize.R
##########
@@ -251,3 +268,21 @@ extract_aggregations <- function(expr, ctx) {
   }
   expr
 }
+
+# This function recurses through expr and wraps each call to median() with a
+# call to arrow_list_element()
+wrap_median <- function(expr, hash) {
+  if (length(expr) == 1) {
+    return(expr)
+  } else {
+    if (is.call(expr) && expr[[1]] == quote(median)) {
+      if (hash) {
+        return(str2lang(paste0("arrow_list_element(", deparse1(expr), ", 
0L)")))
+      } else {
+        return(expr)

Review comment:
       Apparently so; it doesn't work in the scalar aggregate case unless I do 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to