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 9509DD01F for ; Wed, 5 Sep 2012 08:03:16 +0000 (UTC) Received: (qmail 12581 invoked by uid 500); 5 Sep 2012 08:03:15 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 11785 invoked by uid 500); 5 Sep 2012 08:03:11 -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 11732 invoked by uid 500); 5 Sep 2012 08:03:10 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 11717 invoked by uid 99); 5 Sep 2012 08:03:09 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 08:03:09 +0000 Date: Wed, 5 Sep 2012 19:03:09 +1100 (NCT) From: "Navis (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <669178384.37906.1346832189417.JavaMail.jiratomcat@arcas> In-Reply-To: <1303268574.4727.1346122747728.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (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:comment-tabpanel&focusedCommentId=13448563#comment-13448563 ] Navis commented on HIVE-3411: ----------------------------- A boolean tag for filter result is replaced with a byte tag, limiting number of aliases for single join to max 8. I'm not yet decided whether to extended the limit or to throw exception at compile time. > 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: Sub-task > Components: Query Processor > Affects Versions: 0.10.0 > Environment: ubuntu 10.10 > Reporter: Navis > Assignee: Navis > Priority: Minor > Attachments: HIVE-3411.1.patch.txt > > > 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