[
https://issues.apache.org/jira/browse/DRILL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16157374#comment-16157374
]
ASF GitHub Bot commented on DRILL-5002:
---------------------------------------
GitHub user vdiravka opened a pull request:
https://github.com/apache/drill/pull/937
DRILL-5002: Using hive's date functions on top of date column gives w…
…rong results for local time-zone
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/vdiravka/drill DRILL-5002
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/937.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #937
----
commit d65ebbd2f9c942a8a2868c17ac1451d8bb45693f
Author: Vitalii Diravka <[email protected]>
Date: 2017-08-21T17:47:13Z
DRILL-5002: Using hive's date functions on top of date column gives wrong
results for local time-zone
----
> Using hive's date functions on top of date column gives wrong results for
> local time-zone
> -----------------------------------------------------------------------------------------
>
> Key: DRILL-5002
> URL: https://issues.apache.org/jira/browse/DRILL-5002
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Hive, Storage - Parquet
> Reporter: Rahul Challapalli
> Assignee: Vitalii Diravka
> Priority: Critical
> Attachments: 0_0_0.parquet
>
>
> git.commit.id.abbrev=190d5d4
> Wrong Result 1 :
> {code}
> select l_shipdate, `month`(l_shipdate) from cp.`tpch/lineitem.parquet` where
> l_shipdate = date '1994-02-01' limit 2;
> +-------------+---------+
> | l_shipdate | EXPR$1 |
> +-------------+---------+
> | 1994-02-01 | 1 |
> | 1994-02-01 | 1 |
> +-------------+---------+
> {code}
> Wrong Result 2 :
> {code}
> select l_shipdate, `day`(l_shipdate) from cp.`tpch/lineitem.parquet` where
> l_shipdate = date '1998-06-02' limit 2;
> +-------------+---------+
> | l_shipdate | EXPR$1 |
> +-------------+---------+
> | 1998-06-02 | 1 |
> | 1998-06-02 | 1 |
> +-------------+---------+
> {code}
> Correct Result :
> {code}
> select l_shipdate, `month`(l_shipdate) from cp.`tpch/lineitem.parquet` where
> l_shipdate = date '1998-06-02' limit 2;
> +-------------+---------+
> | l_shipdate | EXPR$1 |
> +-------------+---------+
> | 1998-06-02 | 6 |
> | 1998-06-02 | 6 |
> +-------------+---------+
> {code}
> It looks like we are getting wrong results when the 'day' is '01'. I only
> tried month and day hive functions....but wouldn't be surprised if they have
> similar issues too.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)