cloud-fan commented on code in PR #49340: URL: https://github.com/apache/spark/pull/49340#discussion_r1907064280
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala: ########## @@ -93,9 +93,9 @@ object Cast extends QueryErrorsBase { case (NullType, _) => true - case (_, CharType(_) | VarcharType(_)) => false + case (_, CharType(_) | VarcharType(_)) if !SQLConf.get.preserveCharVarcharTypeInfo => false Review Comment: We should update the test. It's a unit test for something that never happened before (because we rewrite char/varchar to string), and it should be allowed. -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org 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