Skip to content

Commit

Permalink
add end-to-end tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H committed Mar 7, 2023
1 parent 8e65992 commit 269790a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions datafusion/core/tests/sqllogictests/test_files/timestamps.slt
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,24 @@ query P
SELECT DATE_TRUNC('second', '2022-08-03 14:38:50Z');
----
2022-08-03T14:38:50

# Test that interval can add a timestamp
query P
SELECT timestamp '2013-07-01 12:00:00' + INTERVAL '8' DAY;
----
2013-07-09T12:00:00

query P
SELECT '2000-01-01T00:00:00'::timestamp + INTERVAL '8' DAY;
----
2000-01-09T00:00:00

query P
SELECT '2000-01-01T00:00:00'::timestamp + INTERVAL '8' YEAR;
----
2008-01-01T00:00:00

query P
SELECT '2000-01-01T00:00:00'::timestamp + INTERVAL '8' MONTH;
----
2000-09-01T00:00:00

0 comments on commit 269790a

Please sign in to comment.