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 9F04BD4A5 for ; Mon, 24 Sep 2012 07:44:10 +0000 (UTC) Received: (qmail 44840 invoked by uid 500); 24 Sep 2012 07:44:10 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 44777 invoked by uid 500); 24 Sep 2012 07:44:10 -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 44355 invoked by uid 500); 24 Sep 2012 07:44:08 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 44351 invoked by uid 99); 24 Sep 2012 07:44:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 07:44:08 +0000 Date: Mon, 24 Sep 2012 18:44:08 +1100 (NCT) From: "Phabricator (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <281022101.115680.1348472648577.JavaMail.jiratomcat@arcas> In-Reply-To: <1303268574.4727.1346122747728.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (HIVE-3411) Filter predicates on outer join overlapped on single alias is not handled properly 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-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phabricator updated HIVE-3411: ------------------------------ Attachment: HIVE-3411.D5169.5.patch navis updated the revision "HIVE-3411 [jira] Filter predicates on outer join overlapped on single alias is not handled properly". Reviewers: JIRA Fixed comments REVISION DETAIL https://reviews.facebook.net/D5169 AFFECTED FILES ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/JoinUtil.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SkewJoinHandler.java ql/src/java/org/apache/hadoop/hive/ql/optimizer/MapJoinProcessor.java ql/src/java/org/apache/hadoop/hive/ql/parse/QBJoinTree.java ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java ql/src/java/org/apache/hadoop/hive/ql/plan/HashTableSinkDesc.java ql/src/java/org/apache/hadoop/hive/ql/plan/JoinDesc.java ql/src/test/queries/clientpositive/join_filters_overlap.q ql/src/test/results/clientpositive/auto_join29.q.out ql/src/test/results/clientpositive/join_filters_overlap.q.out To: JIRA, navis Cc: njain > Filter predicates on outer join overlapped on single alias is not handled properly > ---------------------------------------------------------------------------------- > > Key: HIVE-3411 > URL: https://issues.apache.org/jira/browse/HIVE-3411 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.10.0 > Environment: ubuntu 10.10 > Reporter: Navis > Assignee: Navis > Priority: Minor > Attachments: HIVE-3411.1.patch.txt, HIVE-3411.2.patch.txt, HIVE-3411.D5169.5.patch > > > Currently, join predicates on outer join are evaluated in join operator (or HashSink for MapJoin) and the result value is tagged to end of each values(as a boolean), which is used for joining values. But when predicates are overlapped on single alias, all the predicates are evaluated with AND conjunction, which makes invalid result. > For example with table a with values, > {noformat} > 100 40 > 100 50 > 100 60 > {noformat} > Query below has overlapped predicates on alias b, which is making all the values on b are tagged with true(filtered) > {noformat} > select * from a right outer join a b on (a.key=b.key AND a.value=50 AND b.value=50) left outer join a c on (b.key=c.key AND b.value=60 AND c.value=60); > NULL NULL 100 40 NULL NULL > NULL NULL 100 50 NULL NULL > NULL NULL 100 60 NULL NULL > -- Join predicate > Join Operator > condition map: > Right Outer Join0 to 1 > Left Outer Join1 to 2 > condition expressions: > 0 {VALUE._col0} {VALUE._col1} > 1 {VALUE._col0} {VALUE._col1} > 2 {VALUE._col0} {VALUE._col1} > filter predicates: > 0 > 1 {(VALUE._col1 = 50)} {(VALUE._col1 = 60)} > 2 > {noformat} > but this should be > {noformat} > NULL NULL 100 40 NULL NULL > 100 50 100 50 NULL NULL > NULL NULL 100 60 100 60 > {noformat} -- 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