You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/06/09 08:49:24 UTC
[jira] [Commented] (DRILL-704) issue with casting varchar into date
[ https://issues.apache.org/jira/browse/DRILL-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14021705#comment-14021705 ]
Jacques Nadeau commented on DRILL-704:
--------------------------------------
This is a cli representation problem, dealt with elsewhere.
> issue with casting varchar into date
> ------------------------------------
>
> Key: DRILL-704
> URL: https://issues.apache.org/jira/browse/DRILL-704
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Chun Chang
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)