jonkeane commented on code in PR #49535:
URL: https://github.com/apache/arrow/pull/49535#discussion_r2996242694
##########
r/tests/testthat/test-dplyr-funcs-conditional.R:
##########
@@ -517,3 +517,85 @@ test_that("external objects are found when they're not in
the global environment
tibble(x = c("a", "b"), x2 = c("foo", NA))
)
})
+
+test_that("when_any()", {
+ # combines with OR (3 inputs)
+ compare_dplyr_binding(
+ .input |>
+ mutate(result = when_any(lgl, false, int > 5)) |>
+ collect(),
+ tbl
+ )
+
+ # na_rm=TRUE treats NA as FALSE
+ compare_dplyr_binding(
+ .input |>
+ mutate(result = when_any(lgl, false, na_rm = TRUE)) |>
+ collect(),
+ tbl
+ )
Review Comment:
I assume that `lgl` here has `NA`s and that's what is being tested here,
right?
--
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]