dbatomic commented on code in PR #45383:
URL: https://github.com/apache/spark/pull/45383#discussion_r1519576239
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/AnsiTypeCoercion.scala:
##########
@@ -173,6 +185,8 @@ object AnsiTypeCoercion extends TypeCoercionBase {
inType: DataType,
expectedType: AbstractDataType): Option[DataType] = {
(inType, expectedType) match {
+ case (_: StringType, st: StringType) =>
+ Some(st)
Review Comment:
Can you use explicit `isDefaultCollation`? In general, let's stay away of
using `StringType` case object. We left it due to backwards compatability, but
we should use explicit `st: StringType if st.isDefaultCollation` checks in
Spark code.
--
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]