djnavarro edited a comment on pull request #12154:
URL: https://github.com/apache/arrow/pull/12154#issuecomment-1014161114
I think I've taken this as far as I can right now? I had been hoping to
write shims to support the `week_start` and `change_on_boundary` arguments but
I'm not sure if that's possible right now. My original thought was to try
something like this:
```r
week_start_shim <- function(function_name, x, week_start, opts) {
offset <- Expression$create(Scalar$create(as.difftime(week_start - 4,
units = "days")))
x <- Expression$create("add", x, offset)
x <- Expression$create(function_name, x, options = opts)
return(Expression$create("subtract", x, offset))
}
```
I can't get anything like this to work because (as far as I can tell) we
don't currently have the ability to add or subtract durations from date/time
data in Arrow. I imagine I'm missing something obvious here!
--
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]