cloud-fan commented on a change in pull request #25425: [SPARK-28497][FOLLOWUP][SQL] Allow cast NullType to StringType URL: https://github.com/apache/spark/pull/25425#discussion_r313206869
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala ########## @@ -134,6 +134,7 @@ object Cast { case (DateType, TimestampType) => true case (_: AtomicType, StringType) => true case (_: CalendarIntervalType, StringType) => true + case (NullType, StringType) => true Review comment: I think we can cast null type to any type, how about `case (NullType, _) => true`? ---------------------------------------------------------------- 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 With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org