jonkeane commented on a change in pull request #12429:
URL: https://github.com/apache/arrow/pull/12429#discussion_r808102891
##########
File path: r/tests/testthat/test-dplyr-funcs-datetime.R
##########
@@ -711,3 +711,19 @@ test_that("am/pm mirror lubridate", {
)
})
+
+test_that("semester", {
+ test_df <- tibble(
+ month = c(1:12, NA),
+ month_char_pad = ifelse(month < 10, paste0("0", month), month),
+ dates = as.Date(paste0("2021-", month_char_pad, "-15"))
+ )
+
+ compare_dplyr_binding(
+ .input %>%
+ mutate(sem_wo_year = semester(dates),
+ sem_w_year = semester(dates, with_year = TRUE)) %>%
+ collect(),
+ test_df
+ )
Review comment:
Yup, totally agree that `month` is the thing that should do this to
accept a broader array of inputs + testing there. I also commented on the Jira
with some ideas about how to move forward there
--
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]