Skip to content

[C++] temporal addition and subtraction with integers #32352

Description

@asfimport

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.

Reporter: Neal Richardson / @nealrichardson

Note: This issue was originally created as ARROW-17043. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions