cloud-fan commented on code in PR #45819:
URL: https://github.com/apache/spark/pull/45819#discussion_r1575749860
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CollationTypeCasts.scala:
##########
@@ -118,17 +121,21 @@ object CollationTypeCasts extends TypeCoercionRule {
)
// Only implicit or default collations present
case 0 =>
- val implicitTypes = expr.map(_.dataType)
+ val implicitTypes = expr.filter {
+ case Literal(_, _: StringType) => false
+ case Cast(child, _: StringType, _, _) =>
child.dataType.isInstanceOf[StringType]
Review Comment:
oh wait, if users use scala/python DataFrame to cast a column to a
StringType with specific collation, should it be explicit 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]