dragosmg commented on a change in pull request #12433:
URL: https://github.com/apache/arrow/pull/12433#discussion_r810919455
##########
File path: r/tests/testthat/test-dplyr-funcs-datetime.R
##########
@@ -711,3 +711,23 @@ test_that("am/pm mirror lubridate", {
)
})
+
+test_that("date works in arrow", {
+ # https://issues.apache.org/jira/browse/ARROW-13168
+ skip_on_os("windows")
+ # this date is specific since lubridate::date() is different from
base::as.Date()
+ # since as.Date returns the UTC date and date() doesn't
+ test_df <- tibble(
+ a = as.POSIXct(c("2012-03-26 23:12:13", NA), tz = "America/New_York"))
+
+ # we can't (for now) use namespacing, so we need to make sure
lubridate::date()
+ # and not base::date() is being used
+ # TODO remove once https://issues.apache.org/jira/browse/ARROW-14575 is done
+ date <- lubridate::date
Review comment:
As far as I can tell, that is correct (it is only necessary for
testing). I never had this issue in an interactive session, after attaching
lubridate. I don't think we will be 100% sure until we support namespacing with
`pkg::function()` syntax.
--
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]