jonkeane commented on a change in pull request #10780:
URL: https://github.com/apache/arrow/pull/10780#discussion_r676629389
##########
File path: r/R/dplyr-summarize.R
##########
@@ -18,19 +18,24 @@
# The following S3 methods are registered on load if dplyr is present
-summarise.arrow_dplyr_query <- function(.data, ...) {
- call <- match.call()
- .data <- arrow_dplyr_query(.data)
- if (query_on_dataset(.data)) {
- not_implemented_for_dataset("summarize()")
+summarise.arrow_dplyr_query <- function(.data, ..., .engine = c("arrow",
"duckdb")) {
+ if (match.arg(.engine) == "duckdb") {
+ tbl <- to_duckdb(.data)
+ dplyr::summarise(tbl, ...)
+ } else {
+ call <- match.call()
+ .data <- arrow_dplyr_query(.data)
+ if (query_on_dataset(.data)) {
+ not_implemented_for_dataset("summarize()")
+ }
+ exprs <- quos(...)
+ # Only retain the columns we need to do our aggregations
Review comment:
Yeah, the pushdown will be here very shortly — I got an email from Pedro
that he has a working version on a branch, though I haven't had a chance to
test it myself yet. Regardless, I can't think of a reason _not_ to do this here
anyway.
--
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]