drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Challapalli (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5002) Using hive's date functions on top of date column in parquet gives wrong results
Date Mon, 07 Nov 2016 21:31:59 GMT

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

Rahul Challapalli commented on DRILL-5002:
------------------------------------------

The below also gives wrong results
{code}
select l_shipdate, last_day(l_shipdate) from cp.`tpch/lineitem.parquet` where l_shipdate =
date '1994-02-01' limit 2;
+-------------+-------------+
| l_shipdate  |   EXPR$1    |
+-------------+-------------+
| 1994-02-01  | 1994-01-31  |
| 1994-02-01  | 1994-01-31  |
+-------------+-------------+
2 rows selected (0.64 seconds)
{code}

> Using hive's date functions on top of date column in parquet gives wrong results
> --------------------------------------------------------------------------------
>
>                 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
>            Priority: Critical
>
> 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.3.4#6332)

Mime
View raw message