Skip to content

Commit

Permalink
test: add tests for timezone changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyssmith2nd committed Jul 29, 2024
1 parent 304f0a9 commit 14eacb0
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions datafusion/sqllogictest/test_files/timestamps.slt
Original file line number Diff line number Diff line change
Expand Up @@ -3063,3 +3063,41 @@ SELECT column1 FROM t_utc WHERE column1 IN ('2024-01-31T16:00:01' AT TIME ZONE '
----
2024-02-01T00:00:01Z

query P
SELECT column1 as u from t_utc UNION SELECT column1 from t_europe ORDER BY u;
----
2023-12-31T23:00:01Z
2024-01-01T00:00:01Z
2024-01-31T23:00:01Z
2024-02-01T00:00:01Z
2024-02-29T23:00:01Z
2024-03-01T00:00:01Z

query P
SELECT column1 as e from t_europe UNION SELECT column1 from t_utc ORDER BY e;
----
2024-01-01T00:00:01+01:00
2024-01-01T01:00:01+01:00
2024-02-01T00:00:01+01:00
2024-02-01T01:00:01+01:00
2024-03-01T00:00:01+01:00
2024-03-01T01:00:01+01:00

query P
SELECT nvl2(null, '2020-01-01T00:00:00-04:00'::timestamp, '2021-02-03T04:05:06Z'::timestamp)
----
2021-02-03T04:05:06

query ?
SELECT make_array('2020-01-01T00:00:00-04:00'::timestamp, '2021-01-01T01:02:03Z'::timestamp);
----
[2020-01-01T04:00:00, 2021-01-01T01:02:03]

statement ok
drop table t;

statement ok
drop view t_utc;

statement ok
drop view t_europe;

0 comments on commit 14eacb0

Please sign in to comment.