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 interval equality and comparison between an array and a scalar #6947

Closed
joroKr21 opened this issue Jul 13, 2023 · 0 comments · Fixed by #6948
Closed

Support interval equality and comparison between an array and a scalar #6947

joroKr21 opened this issue Jul 13, 2023 · 0 comments · Fixed by #6948
Labels
enhancement New feature or request

Comments

@joroKr21
Copy link
Contributor

Is your feature request related to a problem or challenge?

Interval equality and comparison works fine between two arrays or between two scalars but it fails between a scalar and an array with an error like this: Data type IntervalMonthDayNano(...) not supported for scalar operation 'gt' on dyn array.

Here is an example query that fails:

select
    (interval '1 day') = i,
    (interval '1 day') != i,
    i < (interval '1 day'),
    i <= (interval '1 day'),
    i > (interval '1 day'),
    i >= (interval '1 day')
from t;

Describe the solution you'd like

Looks like an oversight in the binary_array_op_dyn_scalar macro. Simply adding the cases for interval types should be enough to make it work.

Describe alternatives you've considered

I'm not aware of any alternatives.

Additional context

This is related to #5753

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

Successfully merging a pull request may close this issue.

1 participant