hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Furcy Pin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-15175) NOT IN condition is not handled correctly with predicate push down
Date Thu, 10 Nov 2016 18:01:06 GMT

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

Furcy Pin edited comment on HIVE-15175 at 11/10/16 6:01 PM:
------------------------------------------------------------

for those who want to reproduce:
{code}
DROP TABLE IF EXISTS test ;
CREATE TABLE test (key STRING, val INT) PARTITIONED BY (pkey STRING) ;

INSERT INTO test PARTITION(pkey="a")
VALUES ("a", 1), ("b", 2), ("c", 3) 
;

INSERT INTO test PARTITION(pkey="b")
VALUES ("a", 1), ("b", 2), ("c", 3) 
;
{code}


was (Author: fpin):
for those who want to reproduce:
{code}
DROP TABLE IF EXISTS test ;
CREATE TABLE test (key STRING, val INT) PARTITIONED BY (pkey STRING) ;

INSERT INTO test PARTITION(pkey="a")
VALUES ("a", 1), ("b", 2), ("c", 3) 
;

INSERT INTO test PARTITION(pkey="a")
VALUES ("a", 1), ("b", 2), ("c", 3) 
;
{code}

> NOT IN condition is not handled correctly with predicate push down
> ------------------------------------------------------------------
>
>                 Key: HIVE-15175
>                 URL: https://issues.apache.org/jira/browse/HIVE-15175
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Teruyoshi Zenmyo
>
> With predicate pushdown enabled, NOT IN conditions are treated as FALSE.
> Example (pkey is a partition key)
> {code}
> hive> select * from test;
> OK
> test.key        test.val        test.pkey
> a       1       a
> b       2       a
> c       3       a
> a       1       b
> b       2       b
> c       3       b
> Time taken: 0.171 seconds, Fetched: 6 row(s)
> hive> set hive.optimize.ppd=false;
> hive> select * from test where not pkey in ('a');
> OK
> test.key        test.val        test.pkey
> a       1       b
> b       2       b
> c       3       b
> Time taken: 0.237 seconds, Fetched: 3 row(s)
> hive> set hive.optimize.ppd=true;
> hive> select * from test where not pkey in ('a');
> OK
> test.key        test.val        test.pkey
> {code}



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

Mime
View raw message