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


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java:
##########
@@ -270,25 +272,22 @@ public static UTF8String exec(final UTF8String v, final 
int collationId) {
     public static String genCode(final String v, final int collationId) {
       CollationFactory.Collation collation = 
CollationFactory.fetchCollation(collationId);
       String expr = "CollationSupport.InitCap.exec";
-      if (collation.supportsBinaryEquality || 
collation.supportsLowercaseEquality) {
-        return String.format(expr + "UTF8(%s)", v);
+      if (collation.supportsBinaryEquality) {
+        return String.format(expr + "Binary(%s)", v);
+      } else if (collation.supportsLowercaseEquality) {
+        return String.format(expr + "Lowercase(%s)", v);
       } else {
         return String.format(expr + "ICU(%s, %d)", v, collationId);
       }
     }
-
-    public static UTF8String execUTF8(final UTF8String v) {
+    public static UTF8String execBinary(final UTF8String v) {

Review Comment:
   `CollationSupport` is already formatted like this (plenty of expressions 
with no empty lines) - I wouldn't want to make all those changes in this PR, so 
could we agree to just keep it as it is for now in `CollationSupport`? We can 
work on formatting another time
   
   also, I'll make sure to fix this in other files



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