cloud-fan commented on code in PR #45216:
URL: https://github.com/apache/spark/pull/45216#discussion_r1510829030
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -586,9 +608,38 @@ object ContainsExpressionBuilder extends
StringBinaryPredicateExpressionBuilderB
}
case class Contains(left: Expression, right: Expression) extends
StringPredicate {
- override def compare(l: UTF8String, r: UTF8String): Boolean = l.contains(r)
+ override def checkInputDataTypes(): TypeCheckResult = {
+ val checkResult = super.checkInputDataTypes()
+ if (checkResult.isFailure) {
+ return checkResult
+ }
+ // Additional check needed for collation support
+ if (!CollationFactory.fetchCollation(collationId).isBinaryCollation
+ && collationId != CollationFactory.LOWERCASE_COLLATION_ID) {
Review Comment:
@dbatomic we should unify the naming in followup. binary stable, binary
comparable, default collation, etc.
--
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]