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

Wenchen Fan reassigned SPARK-31227:
-----------------------------------

    Assignee: Hyukjin Kwon

> 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
>
> {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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to