hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thejas M Nair (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-12678) BETWEEN relational operator sometimes returns incorrect results against PARQUET tables
Date Fri, 18 Dec 2015 04:52:46 GMT

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

Thejas M Nair commented on HIVE-12678:
--------------------------------------

Would  you like to look into this [~Ferd] [~dongc] [~xuefuz] ?


> BETWEEN relational operator sometimes returns incorrect results against PARQUET tables
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-12678
>                 URL: https://issues.apache.org/jira/browse/HIVE-12678
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.1.0, 1.2.1
>            Reporter: Nicholas Brenwald
>
> When querying a parquet table, the BETWEEN relational operator returns incorrect results
when hive.optimize.index.filter and hive.optimize.ppd.storage are enabled
> Create a parquet table:
> {code}
> create table t(c string) stored as parquet;
> {code}
> Insert some strings representing dates
> {code}
> insert into t select '2015-12-09' from default.dual limit 1;
> insert into t select '2015-12-10' from default.dual limit 1;
> insert into t select '2015-12-11' from default.dual limit 1;
> {code}
> h3. Example 1
> This query correctly returns 3:
> {code}
> set hive.optimize.index.filter=true;
> set hive.optimize.ppd.storage=true;
> select count(*) from t where c >= '2015-12-09' and c <= '2015-12-11';
> +------+--+
> | _c0  |
> +------+--+
> | 3    |
> +------+--+
> {code}
> This query incorrectly returns 1:
> {code}
> set hive.optimize.index.filter=true;
> set hive.optimize.ppd.storage=true;
> select count(*) from t where c between '2015-12-09' and '2015-12-11';
> +------+--+
> | _c0  |
> +------+--+
> | 1    |
> +------+--+
> {code}
> Disabling hive.optimize.findex.filter resolves the problem. This query now correctly
returns 3:
> {code}
> set hive.optimize.index.filter=false;
> set hive.optimize.ppd.storage=true;
> select count(*) from t where c between '2015-12-09' and '2015-12-11';
> +------+--+
> | _c0  |
> +------+--+
> | 3    |
> +------+--+
> {code}
> Disabling hive.optimize.ppd.storage resolves the problem. This query now correctly returns
3:
> {code}
> set hive.optimize.index.filter=true;
> set hive.optimize.ppd.storage=false;
> select count(*) from t where c between '2015-12-09' and '2015-12-11';
> +------+--+
> | _c0  |
> +------+--+
> | 3    |
> +------+--+
> {code}
> h3. Example 2
> This query correctly returns 1:
> {code}
> set hive.optimize.index.filter=true;
> set hive.optimize.ppd.storage=true;
> select count(*) from t where c >=  '2015-12-10' and c <= '2015-12-10';
> +------+--+
> | _c0  |
> +------+--+
> | 1    |
> +------+--+
> {code}
> This query incorrectly returns 0:
> {code}
> set hive.optimize.index.filter=true;
> set hive.optimize.ppd.storage=true;
> select count(*) from t where c between '2015-12-10' and '2015-12-10';
> +------+--+
> | _c0  |
> +------+--+
> | 0    |
> +------+--+
> {code}
> Disabling hive.optimize.findex.filter resolves the problem. This query now correctly
returns 1:
> {code}
> set hive.optimize.index.filter=false;
> set hive.optimize.ppd.storage=true;
> select count(*) from t where c >= '2015-12-10' and c <= '2015-12-10';
> +------+--+
> | _c0  |
> +------+--+
> | 1    |
> +------+--+
> {code}
> Disabling hive.optimize.ppd.storage resolves the problem. This query now correctly returns
1:
> {code}
> set hive.optimize.index.filter=true;
> set hive.optimize.ppd.storage=false;
> select count(*) from t where c >= '2015-12-10' and c <= '2015-12-10';
> +------+--+
> | _c0  |
> +------+--+
> | 1    |
> +------+--+
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message