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 2CBE472DE for ; Fri, 2 Sep 2011 16:53:35 +0000 (UTC) Received: (qmail 29808 invoked by uid 500); 2 Sep 2011 16:53:34 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 29753 invoked by uid 500); 2 Sep 2011 16:53: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 29666 invoked by uid 500); 2 Sep 2011 16:53:33 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 29597 invoked by uid 99); 2 Sep 2011 16:53:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 16:53:33 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 16:53:31 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 12AE63C206 for ; Fri, 2 Sep 2011 16:53:10 +0000 (UTC) Date: Fri, 2 Sep 2011 16:53:10 +0000 (UTC) From: "Charles Chen (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <1382089554.11181.1314982390073.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <728472424.15673.1297713598126.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (HIVE-1989) recognize transitivity of predicates on join keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-1989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Charles Chen updated HIVE-1989: ------------------------------- Status: Patch Available (was: Open) > recognize transitivity of predicates on join keys > ------------------------------------------------- > > Key: HIVE-1989 > URL: https://issues.apache.org/jira/browse/HIVE-1989 > Project: Hive > Issue Type: Improvement > Components: Query Processor > Affects Versions: 0.6.0 > Reporter: John Sichi > Assignee: Charles Chen > Fix For: 0.8.0 > > Attachments: HIVE-1989v1.patch, HIVE-1989v10.patch, HIVE-1989v11.patch, HIVE-1989v12.patch, HIVE-1989v4.patch, HIVE-1989v5-WITH-HIVE-2382v1.patch, HIVE-1989v6-WITH-HIVE-2383v1.patch, HIVE-1989v8.patch, HIVE-1989v9.patch > > > Given > {noformat} > set hive.mapred.mode=strict; > create table invites (foo int, bar string) partitioned by (ds string); > create table invites2 (foo int, bar string) partitioned by (ds string); > select count(*) from invites join invites2 on invites.ds=invites2.ds where invites.ds='2011-01-01'; > {noformat} > currently an error occurs: > {noformat} > Error in semantic analysis: No Partition Predicate Found for Alias "invites2" Table "invites2" > {noformat} > The optimizer should be able to infer a predicate on invites2 via transitivity. The current lack places a burden on the user to add a redundant predicate, and makes impossible (at least in strict mode) join views where both underlying tables are partitioned (the join select list has to pick one of the tables arbitrarily). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira