----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29439/#review66305 -----------------------------------------------------------
ql/src/java/org/apache/hadoop/hive/ql/optimizer/unionproc/UnionProcFactory.java <https://reviews.apache.org/r/29439/#comment109699> Code before your change was assuming that for union if child operators is > 1 it implies multi table insert. Now this change is generalising it across all the operators. 1) I don't know if its a correct assumption to say if childe operators >1 it must be multi table insert. 2) Can't this be done just for union? - John Pullokkaran On Dec. 26, 2014, 10:46 p.m., pengcheng xiong wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29439/ > ----------------------------------------------------------- > > (Updated Dec. 26, 2014, 10:46 p.m.) > > > Review request for hive and John Pullokkaran. > > > Repository: hive-git > > > Description > ------- > > In union_remove_6.q, just change > > FROM ( > SELECT key, count(1) as values from inputTbl1 group by key > UNION ALL > SELECT key, count(1) as values from inputTbl1 group by key > ) a > insert overwrite table outputTbl1 select * > insert overwrite table outputTbl2 select *; > > to > > FROM ( > select * from( > SELECT key, count(1) as values from inputTbl1 group by key > UNION ALL > SELECT key, count(1) as values from inputTbl1 group by key > )subq > ) a > insert overwrite table outputTbl1 select * > insert overwrite table outputTbl2 select *; > > select * from outputtbl2 will output nothing > > > Diffs > ----- > > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/unionproc/UnionProcFactory.java > a985c4f > ql/src/test/queries/clientpositive/union_remove_6_subq.q PRE-CREATION > ql/src/test/results/clientpositive/union_remove_6_subq.q.out PRE-CREATION > > Diff: https://reviews.apache.org/r/29439/diff/ > > > Testing > ------- > > > Thanks, > > pengcheng xiong > >