@@ -1998,7 +1998,7 @@ SET TIME ZONE = '+05:00'
19981998
19991999statement ok
20002000CREATE TABLE foo (time TIMESTAMPTZ) AS VALUES
2001- ('2020-01-01T00:00:00+05:00'),
2001+ ('2020-01-01T00:00:00+05:00'),
20022002 ('2020-01-01T01:00:00+05:00'),
20032003 ('2020-01-01T02:00:00+05:00'),
20042004 ('2020-01-01T03:00:00+05:00')
@@ -2045,7 +2045,7 @@ Timestamp(Microsecond, None)
20452045query T
20462046select arrow_typeof(date_trunc('microsecond', to_timestamp(61)))
20472047----
2048- Timestamp(Nanosecond, None)
2048+ Timestamp(Nanosecond, None)
20492049
20502050# check date_bin
20512051query P
@@ -2083,17 +2083,17 @@ NULL 1970-01-01T00:00:00 2031-01-19T23:33:25 1970-01-01T00:00:01 1969-12-31T23:5
20832083# verify timestamp syntax styles are consistent
20842084query BBBBBBBBBBBBB
20852085SELECT to_timestamp(null) is null as c1,
2086- null::timestamp is null as c2,
2087- cast(null as timestamp) is null as c3,
2088- to_timestamp(0) = 0::timestamp as c4,
2089- to_timestamp(1926632005) = 1926632005::timestamp as c5,
2090- to_timestamp(1) = 1::timestamp as c6,
2091- to_timestamp(-1) = -1::timestamp as c7,
2086+ null::timestamp is null as c2,
2087+ cast(null as timestamp) is null as c3,
2088+ to_timestamp(0) = 0::timestamp as c4,
2089+ to_timestamp(1926632005) = 1926632005::timestamp as c5,
2090+ to_timestamp(1) = 1::timestamp as c6,
2091+ to_timestamp(-1) = -1::timestamp as c7,
20922092 to_timestamp(0-1) = (0-1)::timestamp as c8,
2093- to_timestamp(0) = cast(0 as timestamp) as c9,
2094- to_timestamp(1926632005) = cast(1926632005 as timestamp) as c10,
2095- to_timestamp(1) = cast(1 as timestamp) as c11,
2096- to_timestamp(-1) = cast(-1 as timestamp) as c12,
2093+ to_timestamp(0) = cast(0 as timestamp) as c9,
2094+ to_timestamp(1926632005) = cast(1926632005 as timestamp) as c10,
2095+ to_timestamp(1) = cast(1 as timestamp) as c11,
2096+ to_timestamp(-1) = cast(-1 as timestamp) as c12,
20972097 to_timestamp(0-1) = cast(0-1 as timestamp) as c13
20982098----
20992099true true true true true true true true true true true true true
@@ -2106,10 +2106,10 @@ Timestamp(Nanosecond, None) Timestamp(Nanosecond, None) Timestamp(Nanosecond, No
21062106
21072107# verify timestamp output types using timestamp literal syntax
21082108query BBBBBB
2109- SELECT arrow_typeof(to_timestamp(1)) = arrow_typeof(1::timestamp) as c1,
2109+ SELECT arrow_typeof(to_timestamp(1)) = arrow_typeof(1::timestamp) as c1,
21102110 arrow_typeof(to_timestamp(null)) = arrow_typeof(null::timestamp) as c2,
21112111 arrow_typeof(to_timestamp('2023-01-10 12:34:56.000')) = arrow_typeof('2023-01-10 12:34:56.000'::timestamp) as c3,
2112- arrow_typeof(to_timestamp(1)) = arrow_typeof(cast(1 as timestamp)) as c4,
2112+ arrow_typeof(to_timestamp(1)) = arrow_typeof(cast(1 as timestamp)) as c4,
21132113 arrow_typeof(to_timestamp(null)) = arrow_typeof(cast(null as timestamp)) as c5,
21142114 arrow_typeof(to_timestamp('2023-01-10 12:34:56.000')) = arrow_typeof(cast('2023-01-10 12:34:56.000' as timestamp)) as c6
21152115----
@@ -2161,23 +2161,23 @@ query error input contains invalid characters
21612161SELECT to_timestamp_seconds('2020-09-08 12/00/00+00:00', '%c', '%+')
21622162
21632163# to_timestamp with broken formatting
2164- query error bad or unsupported format string
2164+ query error Error parsing timestamp
21652165SELECT to_timestamp('2020-09-08 12/00/00+00:00', '%q')
21662166
21672167# to_timestamp_nanos with broken formatting
2168- query error bad or unsupported format string
2168+ query error Error parsing timestamp
21692169SELECT to_timestamp_nanos('2020-09-08 12/00/00+00:00', '%q')
21702170
21712171# to_timestamp_millis with broken formatting
2172- query error bad or unsupported format string
2172+ query error Error parsing timestamp
21732173SELECT to_timestamp_millis('2020-09-08 12/00/00+00:00', '%q')
21742174
21752175# to_timestamp_micros with broken formatting
2176- query error bad or unsupported format string
2176+ query error Error parsing timestamp
21772177SELECT to_timestamp_micros('2020-09-08 12/00/00+00:00', '%q')
21782178
21792179# to_timestamp_seconds with broken formatting
2180- query error bad or unsupported format string
2180+ query error Error parsing timestamp
21812181SELECT to_timestamp_seconds('2020-09-08 12/00/00+00:00', '%q')
21822182
21832183# Create string timestamp table with different formats
@@ -2266,13 +2266,13 @@ drop table table_a
22662266##########
22672267
22682268statement ok
2269- create table table_a (ts timestamp) as values
2270- ('2020-09-08T11:42:29Z'::timestamp),
2269+ create table table_a (ts timestamp) as values
2270+ ('2020-09-08T11:42:29Z'::timestamp),
22712271 ('2020-09-08T12:42:29Z'::timestamp),
22722272 ('2020-09-08T13:42:29Z'::timestamp)
22732273
22742274statement ok
2275- create table table_b (ts timestamp) as values
2275+ create table table_b (ts timestamp) as values
22762276 ('2020-09-08T11:42:29.190Z'::timestamp),
22772277 ('2020-09-08T13:42:29.190Z'::timestamp),
22782278 ('2020-09-08T12:42:29.190Z'::timestamp)
@@ -2394,8 +2394,8 @@ statement ok
23942394drop table t1
23952395
23962396statement ok
2397- create table table_a (val int, ts1 timestamp, ts2 timestamp) as values
2398- (1, '2018-07-01T06:00:00'::timestamp, '2018-07-01T07:00:00'::timestamp),
2397+ create table table_a (val int, ts1 timestamp, ts2 timestamp) as values
2398+ (1, '2018-07-01T06:00:00'::timestamp, '2018-07-01T07:00:00'::timestamp),
23992399 (2, '2018-07-01T07:00:00'::timestamp, '2018-07-01T08:00:00'::timestamp)
24002400
24012401query I?
0 commit comments