hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesús Camacho Rodríguez <>
Subject Re: Review Request 27318: HIVE-8625: Some union queries result in plans with many unions with CBO on
Date Wed, 29 Oct 2014 04:06:02 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Oct. 29, 2014, 4:06 a.m.)

Review request for hive and Ashutosh Chauhan.

Repository: hive-git

Description (updated)

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


  ql/src/java/org/apache/hadoop/hive/ql/exec/ 2bd40fa6782804804a3b02b312b9e2bfc3cd9e61

  ql/src/java/org/apache/hadoop/hive/ql/exec/ 71cc7eb409adc86e5f729b9b8fd510f95aabb7d7

  ql/src/java/org/apache/hadoop/hive/ql/exec/ 42b546bdb2bf21119e52e6a08480f13d5f2fc344

  ql/src/java/org/apache/hadoop/hive/ql/parse/ 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


Testing (updated)


Jesús Camacho Rodríguez

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message