mihailom-db commented on code in PR #49043:
URL: https://github.com/apache/spark/pull/49043#discussion_r1869202344


##########
sql/api/src/main/scala/org/apache/spark/sql/types/UpCastRule.scala:
##########
@@ -40,8 +40,8 @@ private[sql] object UpCastRule {
     case (DateType, TimestampNTZType) => true
     case (TimestampNTZType, TimestampType) => true
     case (TimestampType, TimestampNTZType) => true
-    case (_: AtomicType, StringType) => true
-    case (_: CalendarIntervalType, StringType) => true
+    case (_: AtomicType, _: StringType) => true

Review Comment:
   Also please make sure that this does not allow casting from int to string 
directly by calling cast. In general by standard we should do `cast (value as 
string) collate collation`, but it is a good catch that we need to allow this 
transition in other operations.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to