----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/27318/ -----------------------------------------------------------
(Updated Oct. 29, 2014, 4:05 a.m.) Review request for hive and Ashutosh Chauhan. Repository: hive-git Description (updated) ------- Fixing style Diffs (updated) ----- ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorUtils.java 2bd40fa6782804804a3b02b312b9e2bfc3cd9e61 ql/src/java/org/apache/hadoop/hive/ql/exec/RowSchema.java 71cc7eb409adc86e5f729b9b8fd510f95aabb7d7 ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java 42b546bdb2bf21119e52e6a08480f13d5f2fc344 ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 355bc1f814af3bf419e8a4b11a03de72c98c4bbd ql/src/test/results/clientpositive/union29.q.out 41dde4e1ce5d0549a5501a35d45c06a506e695db ql/src/test/results/clientpositive/union30.q.out b5065368d3f27a6036d681413f5b3d3bba0af062 ql/src/test/results/clientpositive/union34.q.out dc46ac7b6c62f1b97ed8f8e176e0797ca507e72e ql/src/test/results/clientpositive/union_remove_10.q.out b078793cd216fd3a8aee059f7070706a42b25b5f ql/src/test/results/clientpositive/union_remove_11.q.out 82d91a9d036b5c1a61debfe9258b84e8ae2b8f8e Diff: https://reviews.apache.org/r/27318/diff/ Testing ------- For some queries e.g. union9, union16, we are getting plans with many binary unions when CBO is on. The reason is that an identity select operator is introduced after each union by the CBO; thus, the method that was merging the unions when the translation of the AST into a logical plan was being done is not executed, as it does not detect there is another union operator. With the fix in the patch attached, the method will merge the two unions if (1) one is the child of the other one, or (2) if one is a descendant of the other one and there is an identity select operator between them. Thanks, Jesús Camacho Rodríguez