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 6137E17D88 for ; Wed, 22 Oct 2014 06:27:34 +0000 (UTC) Received: (qmail 65003 invoked by uid 500); 22 Oct 2014 06:27:33 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 64919 invoked by uid 500); 22 Oct 2014 06:27:33 -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 64906 invoked by uid 500); 22 Oct 2014 06:27:33 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 64903 invoked by uid 99); 22 Oct 2014 06:27:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2014 06:27:33 +0000 Date: Wed, 22 Oct 2014 06:27:33 +0000 (UTC) From: "Harish Butani (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-8558) CBO: enable n-way joins after CBO join reordering 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-8558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Harish Butani updated HIVE-8558: -------------------------------- Attachment: HIVE-8558.1.patch > CBO: enable n-way joins after CBO join reordering > ------------------------------------------------- > > Key: HIVE-8558 > URL: https://issues.apache.org/jira/browse/HIVE-8558 > Project: Hive > Issue Type: Bug > Reporter: Harish Butani > Assignee: Harish Butani > Attachments: HIVE-8558.1.patch > > > With CBO, we disable n-way joins. But for consecutive tables we can safely collapse into n-way joins. For e.g this is safe to collapse: > {code} > select p1.p_name, p2.p_name, p3.p_name from part p1 join part p2 on p1.p_name = p2.p_name join part p3 on p3.p_name = p1.p_name; > {code} > whereas, we shouldn't reorder in this case: > {code} > select p1.p_name, p2.p_name, p3.p_name > from part p1 join part p2 on p1.p_name = p2.p_name join part p3 on p3.p_size = p1.p_size and p3.p_size = p2.p_size join part p4 on p1.p_name = p4.p_name; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)