From dev-return-13573-archive-asf-public=cust-asf.ponee.io@calcite.apache.org Mon Oct 7 17:59:03 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 15982180657 for ; Mon, 7 Oct 2019 19:59:02 +0200 (CEST) Received: (qmail 99685 invoked by uid 500); 7 Oct 2019 17:59:02 -0000 Mailing-List: contact dev-help@calcite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@calcite.apache.org Delivered-To: mailing list dev@calcite.apache.org Received: (qmail 99674 invoked by uid 99); 7 Oct 2019 17:59:02 -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, 07 Oct 2019 17:59:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 2BB83E30C1 for ; Mon, 7 Oct 2019 17:59:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 785A8780427 for ; Mon, 7 Oct 2019 17:59:00 +0000 (UTC) Date: Mon, 7 Oct 2019 17:59:00 +0000 (UTC) From: "Aman Sinha (Jira)" To: dev@calcite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CALCITE-3390) ITEM expression does not get pushed to the right input of left-outer-join MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Aman Sinha created CALCITE-3390: ----------------------------------- Summary: ITEM expression does not get pushed to the right input of left-outer-join Key: CALCITE-3390 URL: https://issues.apache.org/jira/browse/CALCITE-3390 Project: Calcite Issue Type: Bug Components: core Affects Versions: 1.21.0 Reporter: Aman Sinha Assignee: Aman Sinha In the following query, the ITEM expression above the Left Outer Join does not get pushed to the right input (null-preserving input) of the join whereas it should since ITEM does not change the nullability. {noformat} explain plan without implementation for select tt7.columns[0], tt8.columns[0] as x from tt7 left outer join tt8 on tt7.columns[0] = tt8.columns[0]; DrillScreenRel DrillProjectRel(EXPR$0=[$1], x=[ITEM($2, 0)]) DrillJoinRel(condition=[=($0, $3)], joinType=[left]) DrillProjectRel($f2=[ITEM($0, 0)], ITEM=[ITEM($0, 0)]) DrillScanRel(table=[[dfs, tmp, tt7]], groupscan=[EasyGroupScan [selectionRoot=file:/tmp/tt7, numFiles=1, columns=[`columns`[0]], files=[file:/tmp/tt7/0_0_0.csv]]]) DrillProjectRel(columns=[$0], $f2=[ITEM($0, 0)]) DrillScanRel(table=[[dfs, tmp, tt8]], groupscan=[EasyGroupScan [selectionRoot=file:/tmp/tt8, numFiles=1, columns=[`columns`, `columns`[0]], files=[file:/tmp/tt8/0_0_0.csv]]]) {noformat} From what I can tell, the change in behavior occurred with https://issues.apache.org/jira/browse/CALCITE-1753 ; before that the ITEM was pushed on both sides of the Left Outer Join. -- This message was sent by Atlassian Jira (v8.3.4#803005)