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 2F3A6EAA1 for ; Thu, 7 Feb 2013 06:53:18 +0000 (UTC) Received: (qmail 53071 invoked by uid 500); 7 Feb 2013 06:53:15 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 52842 invoked by uid 500); 7 Feb 2013 06:53:15 -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 52615 invoked by uid 500); 7 Feb 2013 06:53:14 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 52606 invoked by uid 99); 7 Feb 2013 06:53:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2013 06:53:14 +0000 Date: Thu, 7 Feb 2013 06:53:14 +0000 (UTC) From: "Namit Jain (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-3892) auto sort merge join does not work for 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-3892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Namit Jain updated HIVE-3892: ----------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) Will be fixed as part of HIVE-3403 > auto sort merge join does not work for sub-queries > -------------------------------------------------- > > Key: HIVE-3892 > URL: https://issues.apache.org/jira/browse/HIVE-3892 > Project: Hive > Issue Type: Bug > Components: Query Processor > Reporter: Namit Jain > Assignee: Namit Jain > > set hive.enforce.bucketing = true; > set hive.enforce.sorting = true; > set hive.exec.reducers.max = 1; > CREATE TABLE tbl1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS; > CREATE TABLE tbl2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 2 BUCKETS; > insert overwrite table tbl1 > select * from src where key < 10; > insert overwrite table tbl2 > select * from src where key < 10; > set hive.auto.sort.merge.join=true; > set hive.optimize.bucketmapjoin = true; > set hive.optimize.bucketmapjoin.sortedmerge = true; > set hive.auto.sort.merge.join.bigtbl.matcher = org.apache.hadoop.hive.ql.optimizer.SizeSortMergeJoinBigTableMatcher; > -- The join is being performed in sub-query. It should be converted to a sort-merge join > explain > select count(*) from ( > select a.key as key, a.value as val1, b.value as val2 from tbl1 a join tbl2 b on a.key = b.key > ) subq1; > Even after HIVE-3403, the test above does not convert to a sort-merge join. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira