thisisnic commented on pull request #12154:
URL: https://github.com/apache/arrow/pull/12154#issuecomment-1014860401
> 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!
If the functionality isn't there, I'd be tempted to put this PR aside for
the moment - we're aiming to have a larger number of the `lubridate` and
`stringr` functions implemented for the 8.0.0 release (i.e. ~mid-April) anyway,
so there's no rush with this and there's no need to spend ages working around
the missing functionality (unless you particularly want to!) when it's totally
fine to wait for it to be implemented in C++ anyway. Sorry though, I can
imagine that's a little frustrating on the first ticket you've picked up!
--
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]