You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (JIRA)" <ji...@apache.org> on 2017/08/18 15:04:01 UTC

[jira] [Commented] (DRILL-5377) Five-digit year dates aren't correct displayed via jdbc

    [ https://issues.apache.org/jira/browse/DRILL-5377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133082#comment-16133082 ] 

Vitalii Diravka commented on DRILL-5377:
----------------------------------------

The root cause of the issue is that java.sql.Date cut five-digit year dates in toString() method.

Old behaviour:
{code}
0: jdbc:drill:zk=local> select cast('11551-02-16' as date) as FUTURE_DATE, CURRENT_DATE from (VALUES(1));
+--------------+---------------+
| FUTURE_DATE  | CURRENT_DATE  |
+--------------+---------------+
| 551-02-16   | 2017-08-18    |
+--------------+---------------+
{code}

After fix:
{code}
0: jdbc:drill:zk=local> select cast('11551-02-16' as date) as FUTURE_DATE, CURRENT_DATE from (VALUES(1));
+--------------+---------------+
| FUTURE_DATE  | CURRENT_DATE  |
+--------------+---------------+
| 11551-02-16  | 2017-08-18    |
+--------------+---------------+
{code}

> Five-digit year dates aren't correct displayed via jdbc
> -------------------------------------------------------
>
>                 Key: DRILL-5377
>                 URL: https://issues.apache.org/jira/browse/DRILL-5377
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Storage - Parquet
>    Affects Versions: 1.10.0
>            Reporter: Rahul Challapalli
>            Assignee: Vitalii Diravka
>
> git.commit.id.abbrev=38ef562
> Below is the output, I get from test framework when I disable auto correction for date fields
> {code}
> select l_shipdate from table(cp.`tpch/lineitem.parquet` (type => 'parquet', autoCorrectCorruptDates => false)) order by l_shipdate limit 10;
> ^@356-03-19
> ^@356-03-21
> ^@356-03-21
> ^@356-03-23
> ^@356-03-24
> ^@356-03-24
> ^@356-03-26
> ^@356-03-26
> ^@356-03-26
> ^@356-03-26
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)