vladimirg-db commented on code in PR #46097:
URL: https://github.com/apache/spark/pull/46097#discussion_r1568413581


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java:
##########
@@ -99,7 +99,10 @@ public static boolean execLowercase(final UTF8String l, 
final UTF8String r) {
     }
     public static boolean execICU(final UTF8String l, final UTF8String r,
         final int collationId) {
-      return CollationAwareUTF8String.matchAt(l, r, 0, collationId);
+      if (r.numBytes() == 0) return true;
+      if (l.numBytes() == 0) return false;
+      StringSearch stringSearch = CollationFactory.getStringSearch(l, r, 
collationId);

Review Comment:
   I'm not that good at java, but wouldn't it be better to use type inference 
for variables? (`var` or `final var`)



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

Reply via email to