cloud-fan commented on a change in pull request #25581: [SPARK-28495][SQL] Introduce ANSI store assignment policy for table insertion URL: https://github.com/apache/spark/pull/25581#discussion_r317619345
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala ########## @@ -158,6 +158,35 @@ object Cast { case _ => false } + def canANSIStoreAssign(from: DataType, to: DataType): Boolean = (from, to) match { + case _ if from == to => true + case (_: NumericType, _: NumericType) => true + case (_, StringType) => true Review comment: shall we only allow AtomicType to string? ---------------------------------------------------------------- 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