dragosmg commented on code in PR #13440:
URL: https://github.com/apache/arrow/pull/13440#discussion_r908643919


##########
r/tests/testthat/test-dplyr-funcs-datetime.R:
##########
@@ -719,6 +728,15 @@ test_that("extract yday from date", {
   )
 })
 
+test_that("extract qday from date", {
+  compare_dplyr_binding(
+    .input %>%
+      mutate(x = qday(date)) %>%
+      collect(),
+    test_df
+  )
+})
+

Review Comment:
   Looks great so far. Could you add tests with a regular R object? Something 
like:
   ```r
   compare_dplyr_binding(
   .input %>%
     mutate(y = qday(as.Date("2022-06-28")) %>%
     collect(),
   test_df
   )
   ```
   
   I think this would fail, but there's an easy solution: replace the 
`Expression$create()` call with a call to `build_expr()` (which automatically 
converts an R object into a scalar).



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