HyukjinKwon commented on a change in pull request #24176: [SPARK-27233] [SQL]DF 
schema should match with table schema when converted to table
URL: https://github.com/apache/spark/pull/24176#discussion_r268060906
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/types/ArrayType.scala
 ##########
 @@ -90,7 +90,7 @@ case class ArrayType(elementType: DataType, containsNull: 
Boolean) extends DataT
   override def sql: String = s"ARRAY<${elementType.sql}>"
 
   override private[spark] def asNullable: ArrayType =
-    ArrayType(elementType.asNullable, containsNull = true)
+    ArrayType(elementType.asNullable, containsNull)
 
 Review comment:
   Hey, `asNullable` should return it as nullable. This is a general problem 
when you read it, it becomes nullable in SparkSQL file formats (batch 
job-only). We need to revisit nullability (given the community discussion so 
far) in general, not only specifically for this one.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to