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

[GitHub] [arrow] eitsupi commented on a diff in pull request #35667: GH-33987: [R] Support new dplyr .by/by argument

eitsupi commented on code in PR #35667:
URL: https://github.com/apache/arrow/pull/35667#discussion_r1211733586


##########
r/tests/testthat/test-dplyr-filter.R:
##########
@@ -425,3 +425,34 @@ test_that("filter() with across()", {
     tbl
   )
 })
+
+test_that(".by argument", {
+  compare_dplyr_binding(
+    .input %>%
+      filter(is.na(lgl), .by = chr) %>%
+      select(chr, int, lgl) %>%
+      collect(),
+    tbl
+  )
+  compare_dplyr_binding(
+    .input %>%
+      filter(.by = chr) %>%
+      select(chr, int, lgl) %>%
+      collect(),
+    tbl
+  )
+  compare_dplyr_binding(
+    .input %>%
+      filter(int > 2, pnorm(dbl) > .99, .by = chr) %>%
+      collect(),
+    tbl,
+    warning = "Expression pnorm\\(dbl\\) > 0.99 not supported in Arrow; pulling data into R"
+  )

Review Comment:
   This is an intentional test to ensure that no grouping occurs during conversion to data.frame.
   Added a comment.



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