ulysses-you commented on a change in pull request #29403:
URL: https://github.com/apache/spark/pull/29403#discussion_r496595818
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/ScalaReflection.scala
##########
@@ -739,6 +771,8 @@ object ScalaReflection extends ScalaReflection {
val Schema(dataType, nullable) = schemaFor(fieldType)
StructField(fieldName, dataType, nullable)
}), nullable = true)
+ case t if isSubtype(t, localTypeOf[Enumeration#Value]) =>
+ Schema(StringType, nullable = true)
Review comment:
> But if there is indeed a row with a null in that column and we attempt
to deserialize that rows, then it will cause a runtime failure...isnt it
Actually we will get null back. It's a trick that if input value is null the
serializing will return null.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]