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

Minor: clean up timestamp arithmetic tests #5803

Merged
merged 2 commits into from
Mar 31, 2023
Merged

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 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
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core datafusion crate sqllogictest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants