jonkeane commented on a change in pull request #12431:
URL: https://github.com/apache/arrow/pull/12431#discussion_r807316273



##########
File path: r/tests/testthat/test-dplyr-funcs-datetime.R
##########
@@ -711,3 +711,17 @@ test_that("am/pm mirror lubridate", {
   )
 
 })
+test_that("dst extracts daylight savings time correctly", {
+  test_df <- tibble(
+    dates = as.POSIXct(c("2021-02-20", "2021-07-31", "2021-10-31", 
"2021-01-31"), tz = "Europe/London")
+  )
+  # https://issues.apache.org/jira/browse/ARROW-13168
+  skip_on_os("windows")
+
+  compare_dplyr_binding(
+    .input %>%
+      mutate(dst = dst(dates)) %>%
+      collect(),
+    test_df
+  )

Review comment:
       We should also check what strange inputs would give us and make sure 
those are erroring like we would want them to.
   
   One way you should be able to test this is with something like 
`call_function("is_dst", Scalar$create("this is not a timestamp LOL"))` and see 
what happens — this should execute the function like it would be executed 
inside of the dplyr query, but without all the setup + error capturing.




-- 
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]


Reply via email to