From issues-return-215348-apmail-spark-issues-archive=spark.apache.org@spark.apache.org Sat Feb 2 13:12:04 2019 Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D60F1013D for ; Sat, 2 Feb 2019 13:12:04 +0000 (UTC) Received: (qmail 40207 invoked by uid 500); 2 Feb 2019 13:12:04 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 40174 invoked by uid 500); 2 Feb 2019 13:12:04 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 40165 invoked by uid 99); 2 Feb 2019 13:12:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Feb 2019 13:12:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id E2A3418210B for ; Sat, 2 Feb 2019 13:12:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id v3sUNcXlWj_m for ; Sat, 2 Feb 2019 13:12:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 2864C6111F for ; Sat, 2 Feb 2019 13:12:02 +0000 (UTC) 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 DD975E26C7 for ; Sat, 2 Feb 2019 13:12: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 26871243E0 for ; Sat, 2 Feb 2019 13:12:00 +0000 (UTC) Date: Sat, 2 Feb 2019 13:12:00 +0000 (UTC) From: "Apache Spark (JIRA)" To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (SPARK-26812) PushProjectionThroughUnion nullability issue 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/SPARK-26812?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-26812: ------------------------------------ Assignee: (was: Apache Spark) > PushProjectionThroughUnion nullability issue > -------------------------------------------- > > Key: SPARK-26812 > URL: https://issues.apache.org/jira/browse/SPARK-26812 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.4.0 > Reporter: Bogdan Raducanu > Priority: Major > > Union output data types are the output data types of the first child. > However the other union children may have different values nullability. > This means that we can't always push down a project on the children. > To reproduce > {code} > Seq(Map("foo" -> "bar")).toDF("a").write.saveAsTable("table1") > sql("SELECT 1 AS b").write.saveAsTable("table2") > sql("CREATE OR REPLACE VIEW test1 AS SELECT map() AS a FROM table2 UNION ALL SELECT a FROM table1") > sql("select * from test1").show > {code} > This fails becaus the plan is no longer resolved. > The plan is broken by the PushProjectionThroughUnion rule which pushed down a cast to map with values nullability=true on a child with type map with values nullability=false. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org For additional commands, e-mail: issues-help@spark.apache.org