Skip to content

[R] [C++] Allow min/max in grouped aggregation #29694

Closed

Description

@asfimport

Both min() and max() work in non-grouped aggregation and elsewhere, but with a grouped aggregation, we get a not-supported error:

> 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

Reporter: Jonathan Keane / @jonkeane

Related issues:

Note: This issue was originally created as ARROW-14103. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Sep 23, 2021

    @asfimport
    Author

    Ian Cook / @ianmcook:
    @jonkeane  this is working fine for me in recent development versions (since #11175).  Are you using an old build?

    > 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
  2. added this to the 6.0.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions