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 7D1CE99FC for ; Mon, 13 Aug 2012 09:17:48 +0000 (UTC) Received: (qmail 83310 invoked by uid 500); 13 Aug 2012 09:17:48 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 82787 invoked by uid 500); 13 Aug 2012 09:17:47 -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 82471 invoked by uid 500); 13 Aug 2012 09:17:38 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 82443 invoked by uid 99); 13 Aug 2012 09:17:38 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2012 09:17:38 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 10A9B2C5AC9 for ; Mon, 13 Aug 2012 09:17:38 +0000 (UTC) Date: Mon, 13 Aug 2012 20:17:38 +1100 (NCT) From: "Namit Jain (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <1259659438.1093.1344849458069.JavaMail.jiratomcat@arcas> In-Reply-To: <651504216.74371.1342673074418.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (HIVE-3276) optimize union sub-queries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-3276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Namit Jain updated HIVE-3276: ----------------------------- Attachment: hive.3276.2.patch > optimize union sub-queries > -------------------------- > > Key: HIVE-3276 > URL: https://issues.apache.org/jira/browse/HIVE-3276 > Project: Hive > Issue Type: Bug > Reporter: Namit Jain > Assignee: Namit Jain > Attachments: HIVE-3276.1.patch, hive.3276.2.patch > > > It might be a good idea to optimize simple union queries containing map-reduce jobs in at least one of the sub-qeuries. > For eg: > a query like: > insert overwrite table T1 partition P1 > select * from > ( > subq1 > union all > subq2 > ) u; > today creates 3 map-reduce jobs, one for subq1, another for subq2 and > the final one for the union. > It might be a good idea to optimize this. Instead of creating the union > task, it might be simpler to create a move task (or something like a move > task), where the outputs of the two sub-queries will be moved to the final > directory. This can easily extend to more than 2 sub-queries in the union. > This is only useful if there is a select * followed by filesink after the > union. This can be independently useful, and also be used to optimize the > skewed joins https://cwiki.apache.org/Hive/skewed-join-optimization.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira