You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2020/03/26 08:53:00 UTC

[jira] [Resolved] (SPARK-31227) Non-nullable null type should not coerce to nullable type

     [ https://issues.apache.org/jira/browse/SPARK-31227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wenchen Fan resolved SPARK-31227.
---------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Issue resolved by pull request 27991
[https://github.com/apache/spark/pull/27991]

> Non-nullable null type should not coerce to nullable type
> ---------------------------------------------------------
>
>                 Key: SPARK-31227
>                 URL: https://issues.apache.org/jira/browse/SPARK-31227
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.1.0
>            Reporter: Hyukjin Kwon
>            Assignee: Hyukjin Kwon
>            Priority: Minor
>             Fix For: 3.0.0
>
>
> {code}
> scala> spark.range(10).selectExpr("array()").printSchema()
> root
>  |-- array(): array (nullable = false)
>  |    |-- element: null (containsNull = false)
> scala> spark.range(10).selectExpr("concat(array()) as arr").printSchema()
> root
>  |-- arr: array (nullable = false)
>  |    |-- element: null (containsNull = false)
> scala> spark.range(10).selectExpr("concat(array(), array(1)) as arr").printSchema()
> root
>  |-- arr: array (nullable = false)
>  |    |-- element: integer (containsNull = true)
> {code}
> The last case should not coerce to nullable type.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org