uros-db commented on code in PR #46511: URL: https://github.com/apache/spark/pull/46511#discussion_r1599736471
########## common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationAwareUTF8String.java: ########## @@ -183,6 +204,19 @@ public static int findInSet(final UTF8String match, final UTF8String set, int co return 0; } + public static int lowercaseIndexOf(final UTF8String target, final UTF8String pattern, + final int start) { + if (pattern.numChars() == 0) return 0; Review Comment: that's not expected behaviour for `indexOf` in general, so I think it should stay 0 for `lowercaseIndexOf` UTF8String `public int indexOf`: ``` if (v.numBytes() == 0) { return 0; } ``` CollationAwareUTF8String `public static int indexOf`: ``` if (pattern.numBytes() == 0) { return 0; } ``` -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org