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

[jira] [Updated] (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 ]

Hyukjin Kwon updated SPARK-31227:
---------------------------------
    Affects Version/s:     (was: 3.0.0)
                       3.1.0

> 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
>            Priority: Minor
>
> {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