We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to compute Interval - Timestamp should raise an error, as it does not make any semantic sense
This is from timestamp.slt
create table foo (val int, ts1 timestamp, ts2 timestamp, i interval) as values (1, '2023-03-15T15:00:20.000000123'::timestamp, '2023-01-20T23:00:00.000000099'::timestamp, '1 day'::interval), (2, '2023-02-28T12:01:55.000123456'::timestamp, '2000-02-23T11:00:00.123000001'::timestamp, '2 months'::interval), (3, '2033-11-02T23:22:13.000123456'::timestamp, '1990-03-01T00:00:00.333000001'::timestamp, '1 day 3 hours'::interval), (4, '2003-07-11T01:31:15.000123456'::timestamp, '2045-04-11T15:00:00.000000001'::timestamp, '1 day 7 nanoseconds'::interval); SELECT i - ts1 from FOO; ---- 2023-03-14T15:00:20.000000123 2022-12-28T12:01:55.000123456 2033-11-01T20:22:13.000123456 2003-07-10T01:31:15.000123449
SELECT i - ts1 from FOO;
Should raise an error about unsupported operation
No response
The text was updated successfully, but these errors were encountered:
I prepare to fix it
Sorry, something went wrong.
I think this PR changed the behavior. Besides interval - timestamp, interval - date should give an error. There are 2 wrong resulting tests here: https://github.com/apache/arrow-datafusion/blob/710ccf81084adcd46f551615a6bb6a76e71ce55a/datafusion/core/tests/sqllogictests/test_files/type_coercion.slt#L45
jackwener
Successfully merging a pull request may close this issue.
Describe the bug
Trying to compute Interval - Timestamp should raise an error, as it does not make any semantic sense
To Reproduce
This is from timestamp.slt
Expected behavior
Should raise an error about unsupported operation
Additional context
No response
The text was updated successfully, but these errors were encountered: