hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thejas M Nair (JIRA)" <>
Subject [jira] [Commented] (HIVE-5964) Hive missing a filter predicate causing wrong results joining tables after sort by
Date Fri, 06 Dec 2013 01:09:36 GMT


Thejas M Nair commented on HIVE-5964:

Thanks for reporting this issue. ""'c' " missing is certainly a bug. I verified that
this happens with hive 0.12 as well . 
 "'a' " happening before the join looks fine, that can be pushed since this is an inner

> Hive missing a filter predicate causing wrong results joining tables after sort by
> ----------------------------------------------------------------------------------
>                 Key: HIVE-5964
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.10.0, 0.11.0
>            Reporter: dima machlin
> It seems like the optimization of predicate pushdown is failing under certain conditions
causing wrong results as a filter predicate appears to be completely disregarded by the query
processor for some reason.
> Here is the scenario (assuming "dual" table exists) :
> set hive.optimize.ppd=true;
> drop table if exists test_tbl ;
> create table test_tbl (id string,name string);
> insert into table test_tbl
> select 'a','b' from dual;
> test_tbl now contains :
> a b
> the following query :
> select t2.* 
> from
> (select id,name from (select id,name from test_tbl) t1 sort by id) t2
>  join test_tbl t3 on ( )
> where'c' and'a';
> returns :
> a b
> The filter :"'c' " is missing from the execution plan and obviously doesn't
> The filter "'a' " does appear in the plan and is being applied before the join.
> If the query changes a little bit like removing the sort by, removing the t1 sub-query
or disabling hive.optimize.ppd then the predicate appears.
> I'm able to reproduce the problem both in Hive 0.10 and Hive 0.11 although It seems to
work fine in Hive 0.7

This message was sent by Atlassian JIRA

View raw message