dragosmg commented on a change in pull request #12429:
URL: https://github.com/apache/arrow/pull/12429#discussion_r807963638



##########
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:
       I think the direction for this would be for `month` to support integer 
inputs and then all the tests to happen there. I've added a failing test for 
integer inputs and I will make a note / add a comment to move the test to the 
"it works" block once we support integer inputs for month. I have opened 
[ARROW-15701](https://issues.apache.org/jira/browse/ARROW-15701).




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to