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


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -284,4 +284,15 @@ public static UTF8String getCollationKey(UTF8String input, 
int collationId) {
     }
   }
 
+  public static byte[] getCollationKeyBytes(UTF8String input, int collationId) 
{
+    Collation collation = fetchCollation(collationId);
+    if (collation.supportsBinaryEquality) {
+      return input.getBytes();

Review Comment:
   the idea is we short-circuit for binary collation anyway (this branch is 
never executed in the current implementation)
   
   the only reason why this "if" is included here is because we made is part of 
CollationFactory public interface (if someone else calls this with collationId 
= 0 for example)



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