You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/30 19:53:06 UTC

[GitHub] [arrow-datafusion] alamb opened a new pull request, #5803: Minor: clean up timestamp arithmetic tests

alamb opened a new pull request, #5803:
URL: https://github.com/apache/arrow-datafusion/pull/5803

   # Which issue does this PR close?
   
   Follow on to https://github.com/apache/arrow-datafusion/pull/5764
   
   # Rationale for this change
   When https://github.com/apache/arrow-datafusion/pull/5764 was coded by @berkaysynnada there was no way to create INTERVAL values directly (that needed https://github.com/apache/arrow-datafusion/pull/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 https://github.com/apache/arrow-datafusion/pull/5792 landed
   
   # Are these changes tested?
   Yes all tests
   
   # Are there any user-facing changes?
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb merged pull request #5803: Minor: clean up timestamp arithmetic tests

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #5803:
URL: https://github.com/apache/arrow-datafusion/pull/5803


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb commented on pull request #5803: Minor: clean up timestamp arithmetic tests

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #5803:
URL: https://github.com/apache/arrow-datafusion/pull/5803#issuecomment-1490892432

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] berkaysynnada commented on pull request #5803: Minor: clean up timestamp arithmetic tests

Posted by "berkaysynnada (via GitHub)" <gi...@apache.org>.
berkaysynnada commented on PR #5803:
URL: https://github.com/apache/arrow-datafusion/pull/5803#issuecomment-1491526050

   > @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5803: Minor: clean up timestamp arithmetic tests

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #5803:
URL: https://github.com/apache/arrow-datafusion/pull/5803#discussion_r1153724986


##########
datafusion/core/tests/sqllogictests/test_files/timestamps.slt:
##########
@@ -261,13 +261,19 @@ SELECT INTERVAL '8' MONTH + '2000-01-01T00:00:00'::timestamp;
 ----
 2000-09-01T00:00:00
 
-# Interval columns are created with timestamp subtraction in subquery since they are not supported yet
 statement ok
-create table foo (val int, ts1 timestamp, ts2 timestamp) as values 
-(1, '2023-03-15T15:00:20.000000123'::timestamp, '2023-01-20T23:00:00.000000099'::timestamp),
-(2, '2023-02-28T12:01:55.000123456'::timestamp, '2000-02-23T11:00:00.123000001'::timestamp),
-(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),

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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org