maropu commented on a change in pull request #27991: URL: https://github.com/apache/spark/pull/27991#discussion_r413771594
########## File path: sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala ########## @@ -1532,6 +1532,13 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSparkSession { assert(e.getMessage.contains("string, binary or array")) } + test("SPARK-31227: Non-nullable null type should not coerce to nullable type in concat") { Review comment: Yea, the output has the same type with array(null); ``` scala> sql("select concat(array(), array(NULL))").printSchema root |-- concat(array(), array(NULL)): array (nullable = false) | |-- element: null (containsNull = true) scala> sql("select array()").printSchema root |-- array(): array (nullable = false) | |-- element: null (containsNull = false) scala> sql("select array(null)").printSchema root |-- array(NULL): array (nullable = false) | |-- element: null (containsNull = true) ``` Any concern? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org