thisisnic commented on a change in pull request #11175:
URL: https://github.com/apache/arrow/pull/11175#discussion_r712808219



##########
File path: r/tests/testthat/test-dplyr-group-by.R
##########
@@ -62,9 +62,23 @@ test_that("ungroup", {
       select(int, chr) %>%
       ungroup() %>%
       filter(int > 5) %>%
-      summarize(min_int = min(int)),
-    tbl,
-    warning = TRUE
+      collect(),
+    tbl
+  )
+
+  # to confirm that the above expectation is actually testing what we think 
it's
+  # testing, verify that expect_dplyr_equal() distinguishes between grouped and
+  # ungrouped tibbles
+  expect_error(
+    expect_dplyr_equal(
+      input %>%
+        group_by(chr) %>%
+        select(int, chr) %>%
+        (function(x) if (inherits(x, "tbl_df")) ungroup(x) else x) %>%
+        filter(int > 5) %>%
+        collect(),
+      tbl
+    )

Review comment:
       That makes sense, all good then!




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to