cloud-fan commented on code in PR #49340: URL: https://github.com/apache/spark/pull/49340#discussion_r1907058312
########## sql/api/src/main/scala/org/apache/spark/sql/types/UpCastRule.scala: ########## @@ -41,10 +41,9 @@ private[sql] object UpCastRule { case (TimestampNTZType, TimestampType) => true case (TimestampType, TimestampNTZType) => true - case (_: AtomicType, CharType(_) | VarcharType(_)) => false - case (_: CalendarIntervalType, CharType(_) | VarcharType(_)) => false - case (_: AtomicType, _: StringType) => true - case (_: CalendarIntervalType, _: StringType) => true + case (s1: StringType, s2: StringType) => StringHelper.isMoreConstrained(s1, s2) + case (_: AtomicType, s: StringType) => StringHelper.isPlainString(s) Review Comment: OK let's not support it for now. We should figure out the max length of string form of int/double/decimal later. -- 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