ianmcook commented on a change in pull request #10476:
URL: https://github.com/apache/arrow/pull/10476#discussion_r647630733
##########
File path: r/tests/testthat/test-compute-aggregate.R
##########
@@ -383,33 +383,30 @@ test_that("value_counts", {
})
test_that("any.Array and any.ChunkedArray", {
-
data <- c(1:10, NA, NA)
- expect_vector_equal(any(input > 5), data)
+ expect_vector_equal(any(input > 5, na.rm = TRUE), data)
expect_vector_equal(any(input < 1), data)
expect_vector_equal(any(input < 1, na.rm = TRUE), data)
data_logical <- c(TRUE, FALSE, TRUE, NA, FALSE)
- expect_vector_equal(any(input), data_logical)
+ expect_vector_equal(any(input, na.rm = TRUE), data_logical)
Review comment:
This line and the one below are now identical. Let's please test all
three cases (`na.rm` not specified, set to `FALSE`, and set to `TRUE`:
```suggestion
expect_vector_equal(any(input), data_logical)
expect_vector_equal(any(input, na.rm = FALSE), data_logical)
```
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]