rok commented on pull request #12154: URL: https://github.com/apache/arrow/pull/12154#issuecomment-1014440937
> 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! Would it make sense for the shims to be in R? For add/subtract in arrow see [ARROW-11090](https://issues.apache.org/jira/browse/ARROW-11090). -- 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