uros-db commented on code in PR #45791:
URL: https://github.com/apache/spark/pull/45791#discussion_r1546339255
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -1498,14 +1500,15 @@ case class StringLocate(substr: Expression, str:
Expression, start: Expression)
} else {
l.asInstanceOf[UTF8String].indexOf(
r.asInstanceOf[UTF8String],
- s.asInstanceOf[Int] - 1) + 1
+ s.asInstanceOf[Int] - 1, collationId) + 1
Review Comment:
in order to avoid performance regression for binary collation, I think it's
best to short-circuit here (call `.indexOf` without collationId) using
something like: `if
(CollationFactory.fetchCollation(collationId).isBinaryCollation)`
for more context:
https://github.com/apache/spark/pull/45216#discussion_r1499331276
--
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]