cloud-fan commented on code in PR #48585:
URL: https://github.com/apache/spark/pull/48585#discussion_r1815057614
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala:
##########
@@ -1014,7 +1016,9 @@ object TypeCoercion extends TypeCoercionBase {
case (_: StringType, datetime: DatetimeType) => datetime
case (_: StringType, AnyTimestampType) =>
AnyTimestampType.defaultConcreteType
case (_: StringType, BinaryType) => BinaryType
- // Cast any atomic type to string.
+ // Cast any atomic type to string except if there are strings with
different collations. In
+ // that case we skip the cast.
+ case (st1: StringType, st2: StringType) if st1.collationId !=
st2.collationId => null
Review Comment:
I think this makes sense. Just for my curiosity, can we really hit this
branch today? I don't think there is any function that only accept a certion
string collation.
--
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]