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


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

Review Comment:
   after all, this method is part of a public interface 
(CollationAwareUTF8String.java) - so I think this check is in order (we don't 
know who or how may use this method exactly, although we currently only pass 
positive `pos` values to it)



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