-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[R]: pull on a grouped query returns the wrong column. #43153
Copy link
Copy link
Closed
Labels
Component: RCritical FixBugfixes for security vulnerabilities, crashes, or invalid data.Bugfixes for security vulnerabilities, crashes, or invalid data.Type: bug
Milestone
Description
Describe the bug, including details regarding any error messages, version, and platform.
It looks like pull(disp) here is actually getting the data from gear. I've tried this with both released / from CRAN arrow as well as nightlies.
library(arrow, warn.conflicts = FALSE, quietly = TRUE)
library(dplyr, warn.conflicts = FALSE, quietly = TRUE)
as_arrow <- as_arrow_table(mtcars) |>
group_by(gear, am) |>
pull(disp)as_arrow
#> [1] 4 4 4 3 3 3 3 4 4 4 4 3 3 3 3 3 3 4 4 4 3 3 3 3 3 4 5 5 5 5 5 4as_dplyr <-mtcars |>
group_by(gear, am) |>
pull(disp)
as_dplyr
#> [1] 160.0 160.0 108.0 258.0 360.0 225.0 360.0 146.7 140.8 167.6 167.6 275.8
#> [13] 275.8 275.8 472.0 460.0 440.0 78.7 75.7 71.1 120.1 318.0 304.0 350.0
#> [25] 400.0 79.0 120.3 95.1 351.0 145.0 301.0 121.0as_arrow == as_dplyr
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSEsetdiff(as_arrow, as_dplyr)
#> [1] 4 3 5but without grouping
as_arrow <- as_arrow_table(mtcars) |>
pull(disp)
as_arrow
#> [1] 160.0 160.0 108.0 258.0 360.0 225.0 360.0 146.7 140.8 167.6 167.6 275.8
#> [13] 275.8 275.8 472.0 460.0 440.0 78.7 75.7 71.1 120.1 318.0 304.0 350.0
#> [25] 400.0 79.0 120.3 95.1 351.0 145.0 301.0 121.0as_dplyr <-mtcars |>
pull(disp)
as_dplyr
#> [1] 160.0 160.0 108.0 258.0 360.0 225.0 360.0 146.7 140.8 167.6 167.6 275.8
#> [13] 275.8 275.8 472.0 460.0 440.0 78.7 75.7 71.1 120.1 318.0 304.0 350.0
#> [25] 400.0 79.0 120.3 95.1 351.0 145.0 301.0 121.0as_arrow == as_dplyr
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
#> [16] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
#> [31] TRUE TRUEsetdiff(as_arrow, as_dplyr)
#> numeric(0)Component(s)
R
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: RCritical FixBugfixes for security vulnerabilities, crashes, or invalid data.Bugfixes for security vulnerabilities, crashes, or invalid data.Type: bug
Type
Fields
Give feedbackNo fields configured for issues without a type.