hussain created HIVE-4173:
-----------------------------

             Summary: Hive Ingnoring where clause for multitable insert
                 Key: HIVE-4173
                 URL: https://issues.apache.org/jira/browse/HIVE-4173
             Project: Hive
          Issue Type: Bug
          Components: Query Processor
    Affects Versions: 0.9.0, 0.8.1
         Environment: Red Hat Enterprise Linux Server release 6.3 (Santiago),
            Reporter: hussain
            Priority: Critical


Hive is ignoring Filter conditions given at Multi Insert select statement when  
Filtering given on Source Query..

To highlight this issue, please see below example with where clause 
(status!='C') from employee12 table causing issue and due to which insert 
filters (batch_id='12 and batch_id!='12' )not working and dumping all the data 
coming from source to both the tables.

I have checked the hive execution plan, and didn't find Filter predicates under 
for filtering record per insert statements


from 
(from employee12
select * 
where status!='C') t
insert into table employee1
select 
status,
field1,
'T' as field2,
'P' as field3,
'C' as field4
where batch_id='12'
insert into table employee2
select
status,
field1,
'D' as field2, 
'P' as field3,
'C' as field4
where batch_id!='12';

It is working fine with single insert. Hive generating plan properly.. 
I am able to reproduce this issue with 8.1 and 9.0 version of Hive.
 



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to