Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Mar 30, 2023

Which issue does this PR close?

Follow on to #5764

Related to #5753

Rationale for this change

When #5764 was coded by @berkaysynnada there was no way to create INTERVAL values directly (that needed #5792) leading to some akward tests that added/substracted timestamps to get intervals

What changes are included in this PR?

Update tests to directly use INTERVAL after #5792 landed

Are these changes tested?

Yes all tests

Are there any user-facing changes?

No

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Mar 30, 2023
(3, '2033-11-02T23:22:13.000123456'::timestamp, '1990-03-01T00:00:00.333000001'::timestamp),
(4, '2003-07-11T01:31:15.000123456'::timestamp, '2045-04-11T15:00:00.000000001'::timestamp);
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),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just picked these intervals randomly -- I would be happy to change them if anyone has better suggestions

@alamb
Copy link
Contributor Author

alamb commented Mar 30, 2023

@berkaysynnada I would appreciate a review of this proposal if you have some time

@berkaysynnada
Copy link
Contributor

@berkaysynnada I would appreciate a review of this proposal if you have some time

Thank you for solving the interval issue in the tests. I think when we can handle the timezone part of the timestamps, more detailed tests can be added here like adding 1 month to 2023-03-01:00.00.00+02:00. I don't see any problem now.

@alamb alamb merged commit 533bb5c into apache:main Mar 31, 2023
@alamb alamb deleted the alamb/tests2 branch July 26, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants