Minor: clean up timestamp arithmetic tests#5803
Merged
alamb merged 2 commits intoapache:mainfrom Mar 31, 2023
Merged
Conversation
alamb
commented
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), |
Contributor
Author
There was a problem hiding this comment.
I just picked these intervals randomly -- I would be happy to change them if anyone has better suggestions
Contributor
Author
|
@berkaysynnada I would appreciate a review of this proposal if you have some time |
Contributor
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
INTERVALafter #5792 landedAre these changes tested?
Yes all tests
Are there any user-facing changes?
No