Skip to content

Conversation

@thisisnic
Copy link
Member

@thisisnic thisisnic commented Sep 5, 2022

This PR implements across() within summarise(). It also adds the .groups argument explicitly to the summarise() function signature instead of being passed in via ... (this was necessary to prevent test failures after the addition of expand_across() to summarise()).

@thisisnic thisisnic marked this pull request as ready for review September 5, 2022 07:37
@github-actions
Copy link

github-actions bot commented Sep 5, 2022

@github-actions
Copy link

github-actions bot commented Sep 5, 2022

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

Copy link
Member

@paleolimbot paleolimbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I did a local checkout, too and it worked like a charm:

Details
library(arrow, warn.conflicts = FALSE)
#> Some features are not enabled in this build of Arrow. Run `arrow_info()` for more information.
library(dplyr, warn.conflicts = FALSE)

arrow_table(ggplot2::mpg) |> 
  group_by(manufacturer) |> 
  summarise(across(c(cty, hwy), mean)) |> 
  collect()
#> # A tibble: 15 × 3
#>    manufacturer   cty   hwy
#>    <chr>        <dbl> <dbl>
#>  1 audi          17.6  26.4
#>  2 chevrolet     15    21.9
#>  3 dodge         13.1  17.9
#>  4 ford          14    19.4
#>  5 honda         24.4  32.6
#>  6 hyundai       18.6  26.9
#>  7 jeep          13.5  17.6
#>  8 land rover    11.5  16.5
#>  9 lincoln       11.3  17  
#> 10 mercury       13.2  18  
#> 11 nissan        18.1  24.6
#> 12 pontiac       17    26.4
#> 13 subaru        19.3  25.6
#> 14 toyota        18.5  24.9
#> 15 volkswagen    20.9  29.2

ggplot2::mpg |> 
  group_by(manufacturer) |> 
  summarise(across(c(cty, hwy), mean)) |> 
  collect()
#> # A tibble: 15 × 3
#>    manufacturer   cty   hwy
#>    <chr>        <dbl> <dbl>
#>  1 audi          17.6  26.4
#>  2 chevrolet     15    21.9
#>  3 dodge         13.1  17.9
#>  4 ford          14    19.4
#>  5 honda         24.4  32.6
#>  6 hyundai       18.6  26.9
#>  7 jeep          13.5  17.6
#>  8 land rover    11.5  16.5
#>  9 lincoln       11.3  17  
#> 10 mercury       13.2  18  
#> 11 nissan        18.1  24.6
#> 12 pontiac       17    26.4
#> 13 subaru        19.3  25.6
#> 14 toyota        18.5  24.9
#> 15 volkswagen    20.9  29.2

Created on 2022-09-08 by the reprex package (v2.0.1)

@thisisnic thisisnic merged commit 75d2bfd into apache:master Sep 12, 2022
@ursabot
Copy link

ursabot commented Sep 12, 2022

Benchmark runs are scheduled for baseline = d8571a4 and contender = 75d2bfd. 75d2bfd is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Failed ⬇️0.28% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.35% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 75d2bfd3 ec2-t3-xlarge-us-east-2
[Failed] 75d2bfd3 test-mac-arm
[Failed] 75d2bfd3 ursa-i9-9960x
[Finished] 75d2bfd3 ursa-thinkcentre-m75q
[Finished] d8571a45 ec2-t3-xlarge-us-east-2
[Failed] d8571a45 test-mac-arm
[Failed] d8571a45 ursa-i9-9960x
[Finished] d8571a45 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
…#14042)

This PR implements `across()` within `summarise()`.  It also adds the `.groups` argument explicitly to the `summarise()` function signature instead of being passed in via `...` (this was necessary to prevent test failures after the addition of `expand_across()` to `summarise()`).

Authored-by: Nic Crane <thisisnic@gmail.com>
Signed-off-by: Nic Crane <thisisnic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants