Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
Description
When drill casts varchar into date, we seem to adding a time portion with appears random timezone info.
postgres:
foodmart=# select c_date, cast(c_date as date) from data where c_row < 23;
c_date | c_date
-----------+-----------
1957-04-09 | 1957-04-09
1957-06-13 | 1957-06-13
1996-02-28 | 1996-02-28
1996-01-29 | 1996-01-29
1996-03-01 | 1996-03-01
1996-03-02 | 1996-03-02
1997-02-28 | 1997-02-28
1997-01-29 | 1997-01-29
1997-03-01 | 1997-03-01
1997-03-02 | 1997-03-02
2000-04-01 | 2000-04-01
2000-04-02 | 2000-04-02
2000-04-03 | 2000-04-03
2038-04-08 | 2038-04-08
2039-04-09 | 2039-04-09
2040-04-10 | 2040-04-10
1999-01-08 | 1999-01-08
1999-02-08 | 1999-02-08
1999-03-08 | 1999-03-08
1999-01-18 | 1999-01-18
2003-01-02 | 2003-01-02
1999-04-08 | 1999-04-08
(22 rows)
drill:
0: jdbc:drill:schema=dfs> select cast(c_date as varchar(50)), cast(c_date as date) from data where c_row < 23;
----------------------+
EXPR$0 | EXPR$1 |
----------------------+
1957-04-09 | 1957-04-09T00:00:00.000-08:00 |
1957-06-13 | 1957-06-13T00:00:00.000-07:00 |
1996-02-28 | 1996-02-28T00:00:00.000-08:00 |
1996-01-29 | 1996-01-29T00:00:00.000-08:00 |
1996-03-01 | 1996-03-01T00:00:00.000-08:00 |
1996-03-02 | 1996-03-02T00:00:00.000-08:00 |
1997-02-28 | 1997-02-28T00:00:00.000-08:00 |
1997-01-29 | 1997-01-29T00:00:00.000-08:00 |
1997-03-01 | 1997-03-01T00:00:00.000-08:00 |
1997-03-02 | 1997-03-02T00:00:00.000-08:00 |
2000-04-01 | 2000-04-01T00:00:00.000-08:00 |
2000-04-02 | 2000-04-02T00:00:00.000-08:00 |
2000-04-03 | 2000-04-03T00:00:00.000-07:00 |
2038-04-08 | 2038-04-08T00:00:00.000-07:00 |
2039-04-09 | 2039-04-09T00:00:00.000-07:00 |
2040-04-10 | 2040-04-10T00:00:00.000-07:00 |
1999-01-08 | 1999-01-08T00:00:00.000-08:00 |
1999-02-08 | 1999-02-08T00:00:00.000-08:00 |
1999-03-08 | 1999-03-08T00:00:00.000-08:00 |
1999-01-18 | 1999-01-18T00:00:00.000-08:00 |
2003-01-02 | 2003-01-02T00:00:00.000-08:00 |
1999-04-08 | 1999-04-08T00:00:00.000-07:00 |
----------------------+
22 rows selected (0.175 seconds)
This is a regression.