Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add interval multiplication #580

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

arkanovicz
Copy link
Contributor

Add multiplication of an interval by an integral number multiply_interval(x,y)

  • x can be i8, i16, i32 or i64
  • y can be interval_day or interval_year

Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Postgres additionally supports dividing an interval by a double.

Given the commutative nature of multiply we could consider supporting the reverse order for the arguments but I don't see support for that in any existing documentation so it would likely be unused.

extensions/functions_datetime.yaml Outdated Show resolved Hide resolved
extensions/functions_datetime.yaml Show resolved Hide resolved
Copy link
Member

@EpsilonPrime EpsilonPrime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. @westonpace Would you like a second pass at this one?

extensions/functions_datetime.yaml Show resolved Hide resolved
@westonpace westonpace merged commit c1254ac into substrait-io:main Jan 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants