-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-35445: [R] Behavior something like group_by(foo) |> across(everything()) is different from dplyr #35473
Conversation
|
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
e5d5fd8
to
504253a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this! Would you mind updating the tests to use the example_data
dataset, for consistency with other tests?
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
This comment was marked as off-topic.
This comment was marked as off-topic.
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny change to the tests, otherwise this is good to go. Thanks!
Signed-off-by: SHIMA Tatsuya <ts1s1andn@gmail.com>
Benchmark runs are scheduled for baseline = 3e4eaa9 and contender = 6bd0050. 6bd0050 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
['Python', 'R'] benchmarks have high level of regressions. |
Rationale for this change
The argument
.cols
of thedplyr::across
function has the following description.However, this behavior is currently not reproduced in the
arrow
package and an error occurs when selecting the column used for grouping witheverything()
.Created on 2023-05-05 with reprex v2.0.2
This PR fixes this behavior to match with dplyr's original behavior.
What changes are included in this PR?
across
inmutate
,transmute
, andsummarise
..data
argument of internal functionexpand_across
should bearrow_dplyr_query
.Some tests have been slightly modified to accommodate this change.
mutate
,transmute
,arrange
,filter
always returnarrow_dplyr_query
.Currently,
arrow_dplyr_query
is not returned in the following cases, which was not consistent.group_by(foo) |> mutate(.keep = "none")
Currently, the results of the following query show that the columns used for grouping have moved to the tail and differ from the behavior of dplyr.
group_by(foo) |> transmute()
Currently, the results of the following query show that the columns used for grouping have moved to the tail and differ from the behavior of dplyr.
transmute
, the group columns should move to the left. (This is a different behavior frommutate(.keep = "none")
, which keeps the original position.)Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.
group_by(foo) |> across(everything())
is different from dplyr #35445