You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jesus Camacho Rodriguez (JIRA)" <ji...@apache.org> on 2014/10/28 00:44:33 UTC

[jira] [Created] (HIVE-8625) Some union queries result in plans with many unions with CBO on

Jesus Camacho Rodriguez created HIVE-8625:
---------------------------------------------

             Summary: Some union queries result in plans with many unions with CBO on
                 Key: HIVE-8625
                 URL: https://issues.apache.org/jira/browse/HIVE-8625
             Project: Hive
          Issue Type: Bug
          Components: CBO
    Affects Versions: 0.14.0, 0.15.0
            Reporter: Jesus Camacho Rodriguez
            Priority: Minor


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)