Skip to content

Support interval mul / div double arithmetic #9030

@Omega359

Description

@Omega359

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

As part of updating Datafusion to better support date / time math operations (apache/datafusion#19022 among others) it was uncovered that arrow-rs does not support interval * / number ops that should be valid.

For example:

Multiply an interval by a scalar

  • interval '1 second' * 900 → 00:15:00
  • interval '1 day' * 21 → 21 days
  • interval '1 hour' * 3.5 → 03:30:00

Divide an interval by a scalar

  • interval '1 hour' / 1.5 → 00:40:00

From https://www.postgresql.org/docs/current/functions-datetime.html

Describe the solution you'd like

Updated support for interval and scalar operations in arrow-arith

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions