nealrichardson commented on a change in pull request #11257:
URL: https://github.com/apache/arrow/pull/11257#discussion_r720414219
##########
File path: r/tests/testthat/test-dplyr-summarize.R
##########
@@ -227,6 +228,19 @@ test_that("Group by n_distinct() on dataset", {
collect(),
tbl
)
+ # Without groupby
+ expect_dplyr_equal(
+ input %>%
+ summarize(distinct = n_distinct(lgl, na.rm = FALSE)) %>%
+ collect(),
+ tbl
+ )
+ expect_dplyr_equal(
+ input %>%
+ summarize(distinct = n_distinct(lgl, na.rm = TRUE)) %>%
Review comment:
What about more than one column? What about 0 columns? Both work in on
data.frames in R:
```
> mtcars %>% summarize(n_distinct())
n_distinct()
1 0
> mtcars %>% summarize(n_distinct(hp, cyl))
n_distinct(hp, cyl)
1 23
```
--
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]