mihailom-db commented on code in PR #45422:
URL: https://github.com/apache/spark/pull/45422#discussion_r1530992551
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala:
##########
@@ -215,6 +220,10 @@ object AnsiTypeCoercion extends TypeCoercionBase {
None
}
+ // "canANSIStoreAssign" doesn't account for targets extending
StringTypeCollated, but
+ // ANSIStoreAssign is generally expected to return "true" for
(AtomicType, StringType)
+ case (_: AtomicType, _: StringTypeCollated) => Some(StringType)
Review Comment:
Yes it is. canANSIStoreAssign has a rule for casting AtomicType to
StringType, but since StringTypeCollated does not extend StringType, but only
AbstractDataType, this cast rule will not be picked up. But I would say this
rule has to be improved to check for all canANsiStoreAssign rules.
--
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]