Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3D7D0176A5 for ; Wed, 29 Oct 2014 18:25:35 +0000 (UTC) Received: (qmail 35169 invoked by uid 500); 29 Oct 2014 18:25:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 35099 invoked by uid 500); 29 Oct 2014 18:25:34 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 35083 invoked by uid 500); 29 Oct 2014 18:25:34 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 35080 invoked by uid 99); 29 Oct 2014 18:25:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 18:25:34 +0000 Date: Wed, 29 Oct 2014 18:25:34 +0000 (UTC) From: "Ashutosh Chauhan (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-8625) Some union queries result in plans with many unions with CBO on MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-8625?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Ashutosh Chauhan updated HIVE-8625: ----------------------------------- Fix Version/s: (was: 0.15.0) 0.14.0 > 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 > Reporter: Jes=C3=BAs Camacho Rodr=C3=ADguez > Priority: Minor > Fix For: 0.14.0 > > Attachments: HIVE-8625.patch > > > For some queries e.g. union9, union16, we are getting plans with many bin= ary unions when CBO is on. The reason is that an identity select operator i= s 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 d= one is not executed, as it does not detect there is another union operator.= =20 > 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)