nealrichardson commented on a change in pull request #11592:
URL: https://github.com/apache/arrow/pull/11592#discussion_r741265735
##########
File path: r/R/dplyr-functions.R
##########
@@ -848,6 +848,21 @@ nse_funcs$wday <- function(x,
Expression$create("day_of_week", x, options = list(count_from_zero = FALSE,
week_start = week_start))
}
+nse_funcs$is.Date <- function(x) {
+ lubridate::is.Date(x) ||
Review comment:
Unlikely, but it shouldn't fail if you don't have lubridate installed
##########
File path: r/tests/testthat/test-dplyr-funcs-datetime.R
##########
@@ -44,6 +44,38 @@ test_df <- tibble::tibble(
date = c(as.Date("2021-09-09"), NA)
)
+# These tests test detection of dates and times
+
+test_that("is.* functions from lubridate", {
+ compare_dplyr_binding(
+ .input %>%
+ mutate(x = is.POSIXct(datetime)) %>%
Review comment:
Should these also test the FALSE cases?
--
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]