nealrichardson commented on code in PR #13160:
URL: https://github.com/apache/arrow/pull/13160#discussion_r922422925


##########
r/tests/testthat/test-dplyr-summarize.R:
##########
@@ -459,6 +482,35 @@ test_that("quantile()", {
   )
 })
 
+test_that("quantile() with namespacing", {
+  suppressWarnings(
+    expect_warning(
+      expect_equal(
+        tbl %>%
+          group_by(some_grouping) %>%
+          summarize(
+            q_dbl = quantile(dbl, probs = 0.5, na.rm = TRUE, names = FALSE),
+            q_int = as.double(
+              quantile(int, probs = 0.5, na.rm = TRUE, names = FALSE)
+            )
+          ) %>%
+          arrange(some_grouping),
+        Table$create(tbl) %>%
+          group_by(some_grouping) %>%
+          summarize(
+            q_dbl = stats::quantile(dbl, probs = 0.5, na.rm = TRUE),

Review Comment:
   My point was that because you're calling both namespaced and non-namespaced 
versions in the same call, you're not testing that both versions raise the 
warning: you expect one warning, which could come from any of them, and 
suppress the rest of the warnings. But I looked again and the warning is coming 
from the `quantile` registered function, so as long as you're getting the same 
numbers either way you call it, you're passing through the same code that 
triggers the warnings. So it's ok.



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