Skip to content

Commit

Permalink
move testcases to ./e2e_test
Browse files Browse the repository at this point in the history
Signed-off-by: chagelo <[email protected]>
  • Loading branch information
chagelo committed Nov 22, 2024
1 parent f981424 commit d189c94
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 469 deletions.
11 changes: 0 additions & 11 deletions e2e_test/batch/functions/at_time_zone.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,3 @@ select local AT TIME ZONE tz from t order by 1;

statement ok
drop table t;

# timezone function
query T
select timezone('Europe/Moscow', '2014-10-25 22:00:00 UTC'::timestamptz);
----
2014-10-26 01:00:00

query T
select timezone('Europe/Moscow', '2011-03-26 23:00:00 UTC'::timestamptz);
----
2011-03-27 03:00:00
112 changes: 112 additions & 0 deletions e2e_test/batch/functions/timezone.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
statement ok
SET TimeZone to 'UTC';

query T
SELECT timezone('Europe/Moscow', '2011-03-27 02:00:00'::timestamp);
----
2011-03-26 23:00:00+00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-27 02:59:59'::timestamp);
----
2011-03-26 23:59:59+00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-27 03:00:00'::timestamp);
----
2011-03-26 23:00:00+00:00

query T
SELECT timezone('Europe/Moscow', '2014-10-26 00:59:59'::timestamp);
----
2014-10-25 20:59:59+00:00

query T
SELECT timezone('Europe/Moscow', '2014-10-26 01:00:00'::timestamp);
----
2014-10-25 22:00:00+00:00

query T
SELECT timezone('Europe/Moscow', '2014-10-26 01:00:01'::timestamp);
----
2014-10-25 22:00:01+00:00

query T
SELECT timezone('Asia/Shanghai', '2024-11-20 20:00:00 UTC'::timestamptz);
----
2024-11-21 04:00:00

query T
SELECT timezone('Asia/Shanghai', '2023-02-28 20:00:00 UTC'::timestamptz);
----
2023-03-01 04:00:00

query T
SELECT timezone('Asia/Shanghai', '2024-02-28 20:00:00 UTC'::timestamptz);
----
2024-02-29 04:00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-26 22:00:00 UTC'::timestamptz);
----
2011-03-27 01:00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-26 23:00:00 UTC'::timestamptz);
----
2011-03-27 03:00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-26 23:00:01 UTC'::timestamptz);
----
2011-03-27 03:00:01

query T
SELECT timezone('Europe/Moscow', '2011-03-27 01:00:00 UTC'::timestamptz);
----
2011-03-27 05:00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-27 02:00:00 UTC'::timestamptz);
----
2011-03-27 06:00:00

query T
SELECT timezone('Europe/Moscow', '2011-03-27 02:59:59 UTC'::timestamptz);
----
2011-03-27 06:59:59

query T
SELECT timezone('Europe/Moscow', '2011-03-27 03:00:00 UTC'::timestamptz);
----
2011-03-27 07:00:00

query T
SELECT timezone('Europe/Moscow', '2014-10-25 21:59:59 UTC'::timestamptz);
----
2014-10-26 01:59:59

query T
SELECT timezone('Europe/Moscow', '2014-10-25 22:00:00 UTC'::timestamptz);
----
2014-10-26 01:00:00

query T
SELECT timezone('Europe/Moscow', '2014-10-25 22:59:59 UTC'::timestamptz);
----
2014-10-26 01:59:59

query T
SELECT timezone('Europe/Moscow', '2014-10-25 23:00:00 UTC'::timestamptz);
----
2014-10-26 02:00:00

query T
SELECT timezone('Europe/Moscow', '2014-10-25 23:00:01 UTC'::timestamptz);
----
2014-10-26 02:00:01

query T
SELECT timezone('Europe/Moscow', '2014-10-26 02:00:01 UTC'::timestamptz);
----
2014-10-26 05:00:01
Loading

0 comments on commit d189c94

Please sign in to comment.