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

Furcy Pin commented on HIVE-15040:
----------------------------------

Thanks [~tzenmyo], 

yes, I confirm that after disabling predicate pushdown, I get the correct 
result (tested on Hive 1.1.0 and 2.0.0)

This is quite concerning, as predicate pushdown is one of the most central 
feature of any SQL engine...
Disabling it by default on every query might result in an import performance 
downgrade.

Your issue HIVE-15175 seems to involve partition pruning as well, so i don't 
think this is the same bug.

> LATERAL VIEW + WHERE IN ...= WRONG RESULT
> -----------------------------------------
>
>                 Key: HIVE-15040
>                 URL: https://issues.apache.org/jira/browse/HIVE-15040
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Furcy Pin
>            Priority: Critical
>
> This query:
> {code}
> SELECT 
>   COUNT(1)
> FROM (
>   SELECT 1 as c1 , Array(1, 2, 3) as c2 
>   UNION ALL 
>   SELECT 2 as c1 , Array(2, 3, 4) as c2 
> ) T
> LATERAL VIEW explode(c2) LV AS c
> WHERE c = 42
> AND T.c1 NOT IN (SELECT 1 UNION ALL SELECT 3) 
> ;
> {code}
> returns {{3}} in Hive 1.1.0 and 2.0.0
> But obviously it should return 0, since {{c = 42}} is false.
> It seems that the clause is ignored.
> Spark-SQL does return {{0}}.
> P.S. The UNION ALL is not causing the bug, I just wanted to demonstrate is 
> with a standalone query. Using regular tables instead still causes the same 
> bug.



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

Reply via email to