rok commented on code in PR #13440:
URL: https://github.com/apache/arrow/pull/13440#discussion_r909101940
##########
r/R/dplyr-funcs-datetime.R:
##########
@@ -172,6 +172,15 @@ register_bindings_datetime_components <- function() {
(call_binding("yday", x) - 1) %/% 7 + 1
})
+ register_binding("qday", function(x) {
+ floored_x <- Expression$create("floor_temporal", x, options = list(unit =
9L, calendar_based_origin = FALSE))
+ days_between <- Expression$create("days_between", floored_x, x)
+ if (call_binding("is.Date", x)) {
+ return(Expression$create("add", days_between, Expression$scalar(1L)))
+ }
+ days_between
Review Comment:
It turns out that ["days_between" acero
kernel](https://arrow.apache.org/docs/python/generated/pyarrow.compute.days_between.html)
is doing something different than [qday
is](https://github.com/tidyverse/lubridate/blob/c4714046ec412e669906ab8d1cd9a8e4fb125e13/R/accessors-day.r#L114-L117).
This has way more moving pieces now.
--
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]