uros-b commented on code in PR #57900:
URL: https://github.com/apache/spark/pull/57900#discussion_r3751877348


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationAwareUTF8String.java:
##########
@@ -420,8 +420,7 @@ public static UTF8String toUpperCase(final UTF8String 
target, final int collatio
   private static UTF8String toUpperCaseSlow(final UTF8String target, final int 
collationId) {
     // Note: In order to achieve the desired behavior, we use the ICU 
UCharacter class to
     // convert the string to uppercase, which only accepts a Java strings as 
input.
-    ULocale locale = CollationFactory.fetchCollation(collationId)
-      .getCollator().getLocale(ULocale.ACTUAL_LOCALE);
+    ULocale locale = 
CollationFactory.fetchCollation(collationId).caseConversionLocale;

Review Comment:
   So this PR also fixes Upper & Lower, right? Not just InitCap (as suggested 
by title).



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