[ https://issues.apache.org/jira/browse/DRILL-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13985201#comment-13985201 ]
Mehant Baid commented on DRILL-599: ----------------------------------- We don't support casting from TIMESTAMPTZ to TIME. I am not sure what would this cast mean especially considering TIMESTAMPTZ has a timezone component and TIME does not have a timezone component. > can't convert timestamptz to time > --------------------------------- > > Key: DRILL-599 > URL: https://issues.apache.org/jira/browse/DRILL-599 > Project: Apache Drill > Issue Type: Bug > Reporter: Chun Chang > > postgres: > foodmart=# select c_row, c_timestamptz, cast(c_timestamptz as time) from data; > c_row | c_timestamptz | c_timestamptz > -------+-------------------------------+----------------- > 1 | 1997-02-10 17:32:01-08 | 17:32:01 > 2 | 1997-02-10 17:32:01.000001-08 | 17:32:01.000001 > 3 | 1997-02-10 17:32:01.999999-08 | 17:32:01.999999 > 4 | 1997-02-10 17:32:01.4-08 | 17:32:01.4 > 5 | 1997-02-10 17:32:01.5-08 | 17:32:01.5 > 6 | 1997-02-10 17:32:01.6-08 | 17:32:01.6 > 7 | 1997-02-10 17:32:01-08 | 17:32:01 > 8 | 1997-06-10 17:32:01-07 | 17:32:01 > 9 | 2000-03-15 08:14:01-08 | 08:14:01 > 10 | 2000-03-15 04:14:02-08 | 04:14:02 > 11 | 2000-03-15 02:14:03-08 | 02:14:03 > 12 | 2000-03-15 03:14:04-08 | 03:14:04 > 13 | 2000-03-15 01:14:05-08 | 01:14:05 > 14 | 1997-02-10 17:32:01-08 | 17:32:01 > 15 | 1997-02-10 17:32:01-08 | 17:32:01 > 16 | 1997-02-10 17:32:00-08 | 17:32:00 > 17 | 1997-06-10 18:32:01-07 | 18:32:01 > 18 | 1997-01-02 00:00:00-08 | 00:00:00 > 19 | 1997-01-02 03:04:05-08 | 03:04:05 > 20 | 1997-02-10 17:32:01-08 | 17:32:01 > 21 | 1997-02-10 17:32:01-08 | 17:32:01 > 22 | 1997-02-10 17:32:01-08 | 17:32:01 > 23 | 1997-02-10 17:32:00-08 | 17:32:00 > (23 rows) > drill: > 0: jdbc:drill:schema=dfs> select cast(c_timestamptz as time) from data; > Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while > running query.[error_id: "63c1ad1b-6986-4bee-94ad-5de1b4cb9ac8" > endpoint { > address: "qa-node119.qa.lab" > user_port: 31010 > control_port: 31011 > data_port: 31012 > } > error_type: 0 > message: "Failure while running fragment. < IllegalArgumentException:[ > Invalid format: \"1997-02-10 17:32:01-08\" is malformed at \"97-02-10 > 17:32:01-08\" ]" > ] > Error: exception while executing query (state=,code=0) -- This message was sent by Atlassian JIRA (v6.2#6252)