You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "jonkeane (via GitHub)" <gi...@apache.org> on 2024/07/05 01:39:52 UTC
[I] `pull` on a grouped query returns the wrong column. [arrow]
jonkeane opened a new issue, #43153:
URL: https://github.com/apache/arrow/issues/43153
### 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.
``` r
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)
```
``` r
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 4
```
``` r
as_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.0
```
``` r
as_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 FALSE
```
``` r
setdiff(as_arrow, as_dplyr)
#> [1] 4 3 5
```
**but without grouping**
``` r
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.0
```
``` r
as_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.0
```
``` r
as_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 TRUE
```
``` r
setdiff(as_arrow, as_dplyr)
#> numeric(0)
```
### Component(s)
R
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [R]: `pull` on a grouped query returns the wrong column. [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane closed issue #43153: [R]: `pull` on a grouped query returns the wrong column.
URL: https://github.com/apache/arrow/issues/43153
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [R]: `pull` on a grouped query returns the wrong column. [arrow]
Posted by "jonkeane (via GitHub)" <gi...@apache.org>.
jonkeane commented on issue #43153:
URL: https://github.com/apache/arrow/issues/43153#issuecomment-2212508456
Issue resolved by pull request 43172
https://github.com/apache/arrow/pull/43172
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org