stefankandic commented on code in PR #45383:
URL: https://github.com/apache/spark/pull/45383#discussion_r1513061821
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -509,18 +509,10 @@ abstract class StringPredicate extends BinaryExpression
return checkResult
}
// Additional check needed for collation compatibility
- val rightCollationId: Int =
right.dataType.asInstanceOf[StringType].collationId
- if (collationId != rightCollationId) {
- DataTypeMismatch(
- errorSubClass = "COLLATION_MISMATCH",
- messageParameters = Map(
- "collationNameLeft" ->
CollationFactory.fetchCollation(collationId).collationName,
- "collationNameRight" ->
CollationFactory.fetchCollation(rightCollationId).collationName
- )
- )
- } else {
- TypeCheckResult.TypeCheckSuccess
- }
+ val outputCollationId: Int = TypeCoercion
Review Comment:
why not just add `StringPredicate` to the rule like we did for
`BinaryComparison`?
--
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]