nealrichardson commented on a change in pull request #9745:
URL: https://github.com/apache/arrow/pull/9745#discussion_r601859053
##########
File path: r/tests/testthat/test-dplyr-arrange.R
##########
@@ -151,13 +153,50 @@ test_that("arrange", {
"not supported in Arrow",
fixed = TRUE
)
+})
+
+test_that("arrange() on datetime columns", {
+ expect_dplyr_equal(
+ input %>%
+ arrange(dttm, int) %>%
+ collect(),
+ tbl
+ )
+ skip("Sorting by only a single timestamp column fails (ARROW-12087)")
+ expect_dplyr_equal(
+ input %>%
+ arrange(dttm) %>%
+ collect(),
+ tbl %>%
+ select(dttm, grp)
+ )
+})
+
+test_that("arrange() on logical columns", {
+ skip("Sorting by bool columns is not supported (ARROW-12016)")
+ expect_dplyr_equal(
+ input %>%
+ arrange(lgl, int) %>%
+ collect(),
+ tbl
+ )
+})
+
+test_that("arrange() with bad inputs", {
expect_error(
tbl %>%
Table$create() %>%
arrange(1),
"does not contain any field names",
fixed = TRUE
)
+ expect_error(
+ tbl %>%
+ Table$create() %>%
+ arrange(aertidjfgjksertyj),
+ "not found",
Review comment:
For safety, this should probably be wrapped in `with_language("en",
...)` though testthat/check do seem to set LANGUAGE="en" now.
--
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]