[
https://issues.apache.org/jira/browse/ARROW-14947?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497371#comment-17497371
]
Rok Mihevc edited comment on ARROW-14947 at 2/24/22, 12:41 PM:
---------------------------------------------------------------
[~dragosmg] I didn't look into how rollback works, but I'm guessing it's kind
of like _add/sub/mul/div_ followed by a _floor_ or _ceil_? If that is the case
you could just use the add/sub/muldiv kernels from ARROW-11090 and add
_floor/ceil_ for rollback cases. In case there is something still missing in
C++ we should identify it and write Jiras.
was (Author: rokm):
[~dragosmg] I didn't look into how rollback works, but I'm guessing it's kind
of like _floor_ and _ceil_? If that is the case you could just use the add/sub
kernels from ARROW-11090 and add _floor/ceil_ for rollback cases. In case there
is something still missing in C++ we should identify it and write Jiras.
> [C++] Implement maths with timestamps
> -------------------------------------
>
> Key: ARROW-14947
> URL: https://issues.apache.org/jira/browse/ARROW-14947
> Project: Apache Arrow
> Issue Type: Sub-task
> Components: C++
> Reporter: Nicola Crane
> Priority: Major
>
> Please could we have maths with timestamps implemented?
> In order to implement some of the functionality I'd like in R, I need to be
> able to do maths with dates. For example:
> * Addition and subtraction: Timestamp + Duration = Timestamp (with and
> without rollback so have ability to do e.g. 2021-03-30 minus 1 month and
> either get a null back, or 2021-02-28), plus the ability to specify whether
> to rollback to the first or last, and whether to preserve or rest the time.
> See https://lubridate.tidyverse.org/reference/mplus.html for documentation of
> the R functionality.
> * Multiplying Durations: Duration * Numeric = Duration
--
This message was sent by Atlassian Jira
(v8.20.1#820001)