[
https://issues.apache.org/jira/browse/ARROW-14586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17439252#comment-17439252
]
Dewey Dunnington commented on ARROW-14586:
------------------------------------------
Already [a (skipped) test for
this|https://github.com/apache/arrow/blob/842b1a7a846b928aec9e7922e662940e7948b17e/r/tests/testthat/test-dplyr-summarize.R#L708-L718]!
Still might be nice to have an error message like:
{code:R}
arrow:::arrow_not_supported("Aggregate on an aggregate")
#> Error: Aggregate on an aggregate not supported in Arrow
{code}
> [R] summarise() with nested aggregate expressions has a confusing error
> -----------------------------------------------------------------------
>
> Key: ARROW-14586
> URL: https://issues.apache.org/jira/browse/ARROW-14586
> Project: Apache Arrow
> Issue Type: Bug
> Components: R
> Reporter: Dewey Dunnington
> Assignee: Dewey Dunnington
> Priority: Minor
>
> This affects code along the lines of {{summarise(mean(mean(var))}} where the
> inner expression is an aggregate function. This is probably not useful but
> the error it gives is not particularly helpful:
> {code:R}
> library(arrow, warn.conflicts = FALSE)
> library(dplyr, warn.conflicts = FALSE)
> RecordBatch$create(x = 4) %>%
> summarise(y = mean(mean(x)))
> #> Warning: Error in mean(..temp0) : object '..temp0' not found; pulling data
> into
> #> R
> #> # A tibble: 1 × 1
> #> y
> #> <dbl>
> #> 1 4
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)