uros-db commented on code in PR #46761:
URL: https://github.com/apache/spark/pull/46761#discussion_r1668310656
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -813,12 +813,24 @@ public static String[] getICULocaleNames() {
return Collation.CollationSpecICU.ICULocaleNames;
}
- public static UTF8String getCollationKey(UTF8String input, int collationId) {
+ public static String getCollationKey(String input, int collationId) {
Collation collation = fetchCollation(collationId);
if (collation.supportsBinaryEquality) {
return input;
} else if (collation.supportsLowercaseEquality) {
return input.toLowerCase();
+ } else {
+ CollationKey collationKey = collation.collator.getCollationKey(input);
+ return Arrays.toString(collationKey.toByteArray());
+ }
+ }
+
+ public static UTF8String getCollationKey(UTF8String input, int collationId) {
Review Comment:
note to self: we probably don't need this anymore
--
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]