MaxGekk commented on code in PR #47871:
URL: https://github.com/apache/spark/pull/47871#discussion_r1731426477
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationAwareUTF8String.java:
##########
@@ -671,6 +671,11 @@ public static int indexOf(final UTF8String target, final
UTF8String pattern,
// Initialize the string search with respect to the specified ICU
collation.
String targetStr = target.toValidString();
String patternStr = pattern.toValidString();
+ // Check if `start` is out of bounds. The provided offset `start` is given
in number of
+ // codepoints, so a simple `targetStr.length` check is not sufficient
here. This check is
Review Comment:
Thank you for the explanation.
--
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]