From issues-return-154844-archive-asf-public=cust-asf.ponee.io@hive.apache.org Mon Apr 1 08:06:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D63F6180621 for ; Mon, 1 Apr 2019 10:06:01 +0200 (CEST) Received: (qmail 35236 invoked by uid 500); 1 Apr 2019 08:06:01 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 35226 invoked by uid 99); 1 Apr 2019 08:06:00 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Apr 2019 08:06:00 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 737AAE0E7B for ; Mon, 1 Apr 2019 08:06:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2CC6F24595 for ; Mon, 1 Apr 2019 08:06:00 +0000 (UTC) Date: Mon, 1 Apr 2019 08:06:00 +0000 (UTC) From: "Zoltan Haindrich (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-21230) LEFT OUTER JOIN does not generate transitive IS NOT NULL filter on right side (HiveJoinAddNotNullRule bails out for outer joins) 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-21230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Zoltan Haindrich updated HIVE-21230: ------------------------------------ Resolution: Fixed Fix Version/s: 4.0.0 Status: Resolved (was: Patch Available) pushed to master. Thank you Vineet ! > LEFT OUTER JOIN does not generate transitive IS NOT NULL filter on right side (HiveJoinAddNotNullRule bails out for outer joins) > -------------------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-21230 > URL: https://issues.apache.org/jira/browse/HIVE-21230 > Project: Hive > Issue Type: Improvement > Components: CBO > Reporter: Jesus Camacho Rodriguez > Assignee: Vineet Garg > Priority: Major > Labels: newbie > Fix For: 4.0.0 > > Attachments: HIVE-21230.1.patch, HIVE-21230.2.patch, HIVE-21230.3.patch, HIVE-21230.4.patch, HIVE-21230.5.patch, HIVE-21230.6.patch, HIVE-21230.7.patch, HIVE-21230.8.patch > > > For instance, given the following query: > {code:sql} > SELECT t0.col0, t0.col1 > FROM > ( > SELECT col0, col1 FROM tab > ) AS t0 > LEFT JOIN > ( > SELECT col0, col1 FROM tab > ) AS t1 > ON t0.col0 = t1.col0 AND t0.col1 = t1.col1 > {code} > we could still infer that col0 and col1 cannot be null in the right input and introduce the corresponding filter predicate. Currently, the rule just bails out if it is not an inner join. > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveJoinAddNotNullRule.java#L79 -- This message was sent by Atlassian JIRA (v7.6.3#76005)