[
https://issues.apache.org/jira/browse/ARROW-17043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Neal Richardson updated ARROW-17043:
------------------------------------
Description:
{{date64 + intX}} would be equivalent to {{date64 + intX->cast(duration(unit =
"d"))}} (I guess this is tricky since "s" is the largest duration unit? but
date64 is an integer underneath, we should be able to add another integer to it)
{{timestamp[ms] + intX}} would be equivalent to {{timestamp[ms] +
intX->cast(timestamp(unit = "ms"))}}
etc.
Multiplication and division probably don't make sense, but addition and
subtraction do, at least saves you the trouble of having to convert to a
Duration first.
was:
{{date64 + intX}} would be equivalent to {{date64 + intX->cast(duration(unit =
"d"))}}
{{timestamp[ms] + intX}} would be equivalent to {{timestamp[ms] +
intX->cast(timestamp(unit = "ms"))}}
etc.
Multiplication and division probably don't make sense, but addition and
subtraction do, at least saves you the trouble of having to convert to a
Duration first.
> [C++] temporal addition and subtraction with integers
> -----------------------------------------------------
>
> Key: ARROW-17043
> URL: https://issues.apache.org/jira/browse/ARROW-17043
> Project: Apache Arrow
> Issue Type: Sub-task
> Components: C++
> Reporter: Neal Richardson
> Priority: Major
> Labels: kernel
>
> {{date64 + intX}} would be equivalent to {{date64 + intX->cast(duration(unit
> = "d"))}} (I guess this is tricky since "s" is the largest duration unit? but
> date64 is an integer underneath, we should be able to add another integer to
> it)
> {{timestamp[ms] + intX}} would be equivalent to {{timestamp[ms] +
> intX->cast(timestamp(unit = "ms"))}}
> etc.
> Multiplication and division probably don't make sense, but addition and
> subtraction do, at least saves you the trouble of having to convert to a
> Duration first.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)