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

Support multiply and divide on intervals #13850

Open
2 tasks
alamb opened this issue Dec 19, 2024 · 1 comment
Open
2 tasks

Support multiply and divide on intervals #13850

alamb opened this issue Dec 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Dec 19, 2024

Is your feature request related to a problem or challenge?

Copied directly from apache/arrow-rs#6335 from @samuelcolvin

In Postgres I can do:

select 3 * interval '1 day';
select interval '1 day' * 3;  -- same
select 1.23 * interval '1 day';
-- and divide
select interval '1 day' / 3;

I started trying to add support for this to datafusion but discovered that the operations aren't supported in arrow-rs and adding them (with support for all numeric types) is far from trivial.

Describe the solution you'd like

The idea is to support the syntax above in DataFusion

High level steps are:

Describe alternatives you've considered

No response

Additional context

I believe @milevin is already working on this (so perhaps you would like to assign this ticket to yourself via take)

@alamb alamb added the enhancement New feature or request label Dec 19, 2024
@milevin
Copy link

milevin commented Dec 19, 2024

take

@alamb alamb changed the title Support multiple and divide on intervals Support multiply and divide on intervals Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants