You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Ian Cook (Jira)" <ji...@apache.org> on 2021/09/23 18:19:00 UTC

[jira] [Commented] (ARROW-14103) [R] [C++] Allow min/max in grouped aggregation

    [ https://issues.apache.org/jira/browse/ARROW-14103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17419384#comment-17419384 ] 

Ian Cook commented on ARROW-14103:
----------------------------------

[~jonkeane] this is working fine for me in recent development versions (since [https://github.com/apache/arrow/pull/11175]).  Are you using an old build?
{code}> InMemoryDataset$create(mtcars) %>%
+   group_by(cyl) %>%
+   summarise(min_mpg = min(mpg)) %>%
+   collect()
# A tibble: 3 x 2
    cyl min_mpg
  <dbl>   <dbl>
1     6    17.8
2     4    21.4
3     8    10.4{code}

> [R] [C++] Allow min/max in grouped aggregation
> ----------------------------------------------
>
>                 Key: ARROW-14103
>                 URL: https://issues.apache.org/jira/browse/ARROW-14103
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++, R
>            Reporter: Jonathan Keane
>            Priority: Major
>
> Both {{min()}} and {{max()}} work in non-grouped aggregation and elsewhere, but with a grouped aggregation, we get a not-supported error:
> {code}
> > library(arrow)
> > library(dplyr)
> > 
> > InMemoryDataset$create(mtcars) %>% 
> +   group_by(cyl) %>% 
> +   summarise(min_mpg = min(mpg))
> Warning: Error : Expression min(mpg) not supported in Arrow; pulling data into R
> # A tibble: 3 × 2
>     cyl min_mpg
>   <dbl>   <dbl>
> 1     4    21.4
> 2     6    17.8
> 3     8    10.4
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)