You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.addRoundTrip("timestamp with local time zone", "NULL", createTimestampWithTimeZoneType(3), "CAST(NULL AS TIMESTAMP WITH TIME ZONE)")
346
359
// timestamp with precision 3 examples
347
-
.addRoundTrip("cast(col_0 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2019-03-18 10:01:17.987'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2019-03-18 16:01:17.987 UTC'")
348
-
.addRoundTrip("cast(col_1 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2018-10-28 01:33:17.456'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-10-28 07:33:17.456 UTC'")
349
-
.addRoundTrip("cast(col_2 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2018-10-28 03:33:33.333'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-10-28 09:33:33.333 UTC'")
350
-
.addRoundTrip("cast(col_3 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '1970-01-01 00:13:42.000'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1970-01-01 07:13:42.000 UTC'")
351
-
.addRoundTrip("cast(col_4 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2018-04-01 02:13:55.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-04-01 08:13:55.123 UTC'")
352
-
.addRoundTrip("cast(col_5 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.999'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2020-09-27 17:34:56.999 UTC'")
353
-
.addRoundTrip("cast(col_6 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2018-03-25 03:17:17.000'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-03-25 09:17:17.000 UTC'")
354
-
.addRoundTrip("cast(col_7 AT TIME ZONE 'UTC' AS timestamp with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.000'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1986-01-01 07:13:07.000 UTC'")
360
+
.addRoundTrip("timestamp with local time zone", "TIMESTAMP '2019-03-18 10:01:17.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2019-03-18 16:01:17.123 UTC'")
361
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2018-10-28 01:33:17.456'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-10-28 07:33:17.456 UTC'")
362
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2018-10-28 03:33:33.333'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-10-28 09:33:33.333 UTC'")
363
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '1970-01-01 00:13:42.000'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1970-01-01 07:13:42.000 UTC'")
364
+
//'2018-04-01 02:13:55.123' is a DST gap time, which doesn't "exist" in the jvm time zone
365
+
//The time "jumps" from 2 to 3 in the morning during DST transition
366
+
//Currently the test fails for the DST gap time, therefore it is disabled until further research
367
+
//In practice, dst gap times never happen in the jvm time zone, so we can safely ignore such cases in the tests
368
+
//.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2018-04-01 02:13:55.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-04-01 08:13:55.123 UTC'")
369
+
//.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2018-04-01 02:13:55.123456'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-04-01 08:13:55.123456 UTC'")
370
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2018-04-01 03:13:55.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-04-01 08:13:55.123 UTC'")
371
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.999'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2020-09-27 17:34:56.999 UTC'")
372
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2018-03-25 03:17:17.000'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2018-03-25 09:17:17.000 UTC'")
373
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.000'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1986-01-01 07:13:07.000 UTC'")
355
374
356
375
// timestamp with precision 6-9 examples
357
-
.addRoundTrip("cast(col_8 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '2019-03-18 10:01:17.987654'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2019-03-18 16:01:17.987654 UTC'")
358
-
.addRoundTrip("cast(col_9 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '2018-10-28 01:33:17.456789'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-10-28 07:33:17.456789 UTC'")
359
-
.addRoundTrip("cast(col_10 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '2018-10-28 03:33:33.333333'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-10-28 09:33:33.333333 UTC'")
360
-
.addRoundTrip("cast(col_11 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '1970-01-01 00:13:42.000000'", createTimestampWithTimeZoneType(6), "TIMESTAMP '1970-01-01 07:13:42.000000 UTC'")
361
-
.addRoundTrip("cast(col_12 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '2018-04-01 02:13:55.123456'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-04-01 08:13:55.123456 UTC'")
362
-
.addRoundTrip("cast(col_13 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '2018-03-25 03:17:17.000000'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-03-25 09:17:17.000000 UTC'")
363
-
.addRoundTrip("cast(col_14 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.000000'", createTimestampWithTimeZoneType(6), "TIMESTAMP '1986-01-01 07:13:07.000000 UTC'")
364
-
.addRoundTrip("cast(col_15 AT TIME ZONE 'UTC' AS timestamp(7) with time zone)", "timestamp(7) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.1234567'", createTimestampWithTimeZoneType(7), "TIMESTAMP '1986-01-01 07:13:07.1234567 UTC'")
365
-
.addRoundTrip("cast(col_16 AT TIME ZONE 'UTC' AS timestamp(8) with time zone)", "timestamp(8) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.12345678'", createTimestampWithTimeZoneType(8), "TIMESTAMP '1986-01-01 07:13:07.12345678 UTC'")
366
-
.addRoundTrip("cast(col_17 AT TIME ZONE 'UTC' AS timestamp(9) with time zone)", "timestamp(9) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.123456789'", createTimestampWithTimeZoneType(9), "TIMESTAMP '1986-01-01 07:13:07.123456789 UTC'")
376
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2019-03-18 10:01:17.987654'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2019-03-18 16:01:17.987654 UTC'")
377
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2018-10-28 01:33:17.456789'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-10-28 07:33:17.456789 UTC'")
378
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2018-10-28 03:33:33.333333'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-10-28 09:33:33.333333 UTC'")
379
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '1970-01-01 00:13:42.000000'", createTimestampWithTimeZoneType(6), "TIMESTAMP '1970-01-01 07:13:42.000000 UTC'")
380
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2018-04-01 03:13:55.123456'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-04-01 08:13:55.123456 UTC'")
381
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2018-03-25 03:17:17.000000'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2018-03-25 09:17:17.000000 UTC'")
382
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.000000'", createTimestampWithTimeZoneType(6), "TIMESTAMP '1986-01-01 07:13:07.000000 UTC'")
383
+
.addRoundTrip("timestamp(7) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.1234567'", createTimestampWithTimeZoneType(7), "TIMESTAMP '1986-01-01 07:13:07.1234567 UTC'")
384
+
.addRoundTrip("timestamp(8) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.12345678'", createTimestampWithTimeZoneType(8), "TIMESTAMP '1986-01-01 07:13:07.12345678 UTC'")
385
+
.addRoundTrip("timestamp(9) with local time zone", "TIMESTAMP '1986-01-01 00:13:07.123456789'", createTimestampWithTimeZoneType(9), "TIMESTAMP '1986-01-01 07:13:07.123456789 UTC'")
367
386
368
387
// tests for other precisions (0-5 and some 1's)
369
-
.addRoundTrip("cast(col_18 AT TIME ZONE 'UTC' AS timestamp(1) with time zone)", "timestamp(0) with local time zone", "TIMESTAMP '1970-01-01 00:00:01'", createTimestampWithTimeZoneType(0), "TIMESTAMP '1970-01-01 07:00:01 UTC'")
370
-
.addRoundTrip("cast(col_19 AT TIME ZONE 'UTC' AS timestamp(1) with time zone)", "timestamp(1) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.1'", createTimestampWithTimeZoneType(1), "TIMESTAMP '1970-01-01 07:00:01.1 UTC'")
371
-
.addRoundTrip("cast(col_20 AT TIME ZONE 'UTC' AS timestamp(1) with time zone)", "timestamp(1) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.9'", createTimestampWithTimeZoneType(1), "TIMESTAMP '1970-01-01 07:00:01.9 UTC'")
372
-
.addRoundTrip("cast(col_21 AT TIME ZONE 'UTC' AS timestamp(2) with time zone)", "timestamp(2) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.12'", createTimestampWithTimeZoneType(2), "TIMESTAMP '1970-01-01 07:00:01.12 UTC'")
373
-
.addRoundTrip("cast(col_22 AT TIME ZONE 'UTC' AS timestamp(3) with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1970-01-01 07:00:01.123 UTC'")
374
-
.addRoundTrip("cast(col_23 AT TIME ZONE 'UTC' AS timestamp(3) with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.999'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1970-01-01 07:00:01.999 UTC'")
375
-
.addRoundTrip("cast(col_24 AT TIME ZONE 'UTC' AS timestamp(4) with time zone)", "timestamp(4) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.1234'", createTimestampWithTimeZoneType(4), "TIMESTAMP '1970-01-01 07:00:01.1234 UTC'")
376
-
.addRoundTrip("cast(col_25 AT TIME ZONE 'UTC' AS timestamp(5) with time zone)", "timestamp(5) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.12345'", createTimestampWithTimeZoneType(5), "TIMESTAMP '1970-01-01 07:00:01.12345 UTC'")
377
-
.addRoundTrip("cast(col_26 AT TIME ZONE 'UTC' AS timestamp(1) with time zone)", "timestamp(1) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.1'", createTimestampWithTimeZoneType(1), "TIMESTAMP '2020-09-27 17:34:56.1 UTC'")
378
-
.addRoundTrip("cast(col_27 AT TIME ZONE 'UTC' AS timestamp(1) with time zone)", "timestamp(1) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.9'", createTimestampWithTimeZoneType(1), "TIMESTAMP '2020-09-27 17:34:56.9 UTC'")
379
-
.addRoundTrip("cast(col_28 AT TIME ZONE 'UTC' AS timestamp(3) with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2020-09-27 17:34:56.123 UTC'")
380
-
.addRoundTrip("cast(col_29 AT TIME ZONE 'UTC' AS timestamp(3) with time zone)", "timestamp(3) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.999'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2020-09-27 17:34:56.999 UTC'")
381
-
.addRoundTrip("cast(col_30 AT TIME ZONE 'UTC' AS timestamp(6) with time zone)", "timestamp(6) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.123456'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2020-09-27 17:34:56.123456 UTC'");
.addRoundTrip("timestamp(0) with local time zone", "TIMESTAMP '1970-01-01 00:00:01'", createTimestampWithTimeZoneType(0), "TIMESTAMP '1970-01-01 07:00:01 UTC'")
389
+
.addRoundTrip("timestamp(1) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.1'", createTimestampWithTimeZoneType(1), "TIMESTAMP '1970-01-01 07:00:01.1 UTC'")
390
+
.addRoundTrip("timestamp(1) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.9'", createTimestampWithTimeZoneType(1), "TIMESTAMP '1970-01-01 07:00:01.9 UTC'")
391
+
.addRoundTrip("timestamp(2) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.12'", createTimestampWithTimeZoneType(2), "TIMESTAMP '1970-01-01 07:00:01.12 UTC'")
392
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1970-01-01 07:00:01.123 UTC'")
393
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.999'", createTimestampWithTimeZoneType(3), "TIMESTAMP '1970-01-01 07:00:01.999 UTC'")
394
+
.addRoundTrip("timestamp(4) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.1234'", createTimestampWithTimeZoneType(4), "TIMESTAMP '1970-01-01 07:00:01.1234 UTC'")
395
+
.addRoundTrip("timestamp(5) with local time zone", "TIMESTAMP '1970-01-01 00:00:01.12345'", createTimestampWithTimeZoneType(5), "TIMESTAMP '1970-01-01 07:00:01.12345 UTC'")
396
+
.addRoundTrip("timestamp(1) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.1'", createTimestampWithTimeZoneType(1), "TIMESTAMP '2020-09-27 17:34:56.1 UTC'")
397
+
.addRoundTrip("timestamp(1) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.9'", createTimestampWithTimeZoneType(1), "TIMESTAMP '2020-09-27 17:34:56.9 UTC'")
398
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.123'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2020-09-27 17:34:56.123 UTC'")
399
+
.addRoundTrip("timestamp(3) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.999'", createTimestampWithTimeZoneType(3), "TIMESTAMP '2020-09-27 17:34:56.999 UTC'")
400
+
.addRoundTrip("timestamp(6) with local time zone", "TIMESTAMP '2020-09-27 12:34:56.123456'", createTimestampWithTimeZoneType(6), "TIMESTAMP '2020-09-27 17:34:56.123456 UTC'");
0 commit comments