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 E1478DD51 for ; Fri, 9 Nov 2012 11:40:17 +0000 (UTC) Received: (qmail 77970 invoked by uid 500); 9 Nov 2012 11:40:16 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 77601 invoked by uid 500); 9 Nov 2012 11:40:13 -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 77550 invoked by uid 500); 9 Nov 2012 11:40:12 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 77545 invoked by uid 99); 9 Nov 2012 11:40:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2012 11:40:12 +0000 Date: Fri, 9 Nov 2012 11:40:12 +0000 (UTC) From: "Namit Jain (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <822955930.91436.1352461212542.JavaMail.jiratomcat@arcas> In-Reply-To: <1948905288.38081.1351491432561.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (HIVE-3633) sort-merge join does not work with 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-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Namit Jain updated HIVE-3633: ----------------------------- Attachment: hive.3633.1.patch > sort-merge join does not work with sub-queries > ---------------------------------------------- > > Key: HIVE-3633 > URL: https://issues.apache.org/jira/browse/HIVE-3633 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Reporter: Namit Jain > Assignee: Namit Jain > Attachments: hive.3633.1.patch > > > Consider the following query: > create table smb_bucket_1(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 6 BUCKETS STORED AS TEXTFILE; > create table smb_bucket_2(key int, value string) CLUSTERED BY (key) SORTED BY (key) INTO 6 BUCKETS STORED AS TEXTFILE; > -- load the above tables > set hive.optimize.bucketmapjoin = true; > set hive.optimize.bucketmapjoin.sortedmerge = true; > set hive.input.format = org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat; > explain > select count(*) from > ( > select /*+mapjoin(a)*/ a.key as key1, b.key as key2, a.value as value1, b.value as value2 > from smb_bucket_1 a join smb_bucket_2 b on a.key = b.key) > subq; > The above query does not use sort-merge join. This would be very useful as we automatically convert the queries to use sorting and bucketing properties for 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