You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "thisisnic (via GitHub)" <gi...@apache.org> on 2023/05/13 06:28:48 UTC

[GitHub] [arrow] thisisnic commented on a diff in pull request #35473: GH-35445: [R] Behavior something like group_by(foo) |> across(everything()) is different from dplyr

thisisnic commented on code in PR #35473:
URL: https://github.com/apache/arrow/pull/35473#discussion_r1192930273


##########
r/tests/testthat/test-dplyr-mutate.R:
##########
@@ -652,3 +672,41 @@ test_that("Can use across() within transmute()", {
     example_data
   )
 })
+
+test_that("across() does not select grouping variables within mutate()", {
+  compare_dplyr_binding(
+    .input %>%
+      group_by(chr) %>%
+      mutate(across(everything(), round)) %>%
+      collect(),
+    example_data %>%
+      select(int, dbl, chr)

Review Comment:
   nit: it's more skimmable when the `tbl` parameter to `compare_dplyr_binding()` is just a table with no modification. Please could you move the `select()` to the `expr` parameter code instead?



-- 
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