uros-db commented on code in PR #46511:
URL: https://github.com/apache/spark/pull/46511#discussion_r1599689228


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationAwareUTF8String.java:
##########
@@ -34,6 +34,27 @@
  * Utility class for collation-aware UTF8String operations.
  */
 public class CollationAwareUTF8String {
+
+  public static boolean lowercaseMatchFrom(final UTF8String l, final 
UTF8String r, int pos) {
+    if (pos < 0) return false;
+    for (int len = 0; len <= l.numChars() - pos; len++) {

Review Comment:
   actually, I think "lowercaseMatchFrom" should be able to match empty 
substring of `l` (len=0) to `r` (if `r` is an empty string itself)
   
   otherwise, I would need to add a special case before the loop to cover this 
behaviour - I think there's no need to do that, since the first iteration of 
this loop will cover that scenario



-- 
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

Reply via email to