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 multiple and divide on intervals #6335

Open
samuelcolvin opened this issue Aug 29, 2024 · 3 comments · May be fixed by #6906
Open

Support multiple and divide on intervals #6335

samuelcolvin opened this issue Aug 29, 2024 · 3 comments · May be fixed by #6906
Assignees
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@samuelcolvin
Copy link
Contributor

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.

@samuelcolvin samuelcolvin added the enhancement Any new improvement worthy of a entry in the changelog label Aug 29, 2024
samuelcolvin added a commit to samuelcolvin/datafusion that referenced this issue Aug 29, 2024
@samuelcolvin
Copy link
Contributor Author

I guess we don't need all numeric types, just i64 and f64 scalars would go a long way.

@alamb
Copy link
Contributor

alamb commented Sep 9, 2024

I guess we don't need all numeric types, just i64 and f64 scalars would go a long way.

Yes I think supporting divide for those types would be great (and then datafusion can cast other arguments to one of them in the coercion logic)

@milevin
Copy link

milevin commented Dec 19, 2024

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants