panbingkun commented on code in PR #46222:
URL: https://github.com/apache/spark/pull/46222#discussion_r1579157654
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -245,13 +246,11 @@ public static StringSearch getStringSearch(
* Returns the collation id for the given collation name.
*/
public static int collationNameToId(String collationName) throws
SparkException {
- String normalizedName = collationName.toUpperCase();
+ String normalizedName = collationName.toUpperCase(Locale.ROOT);
if (collationNameToIdMap.containsKey(normalizedName)) {
return collationNameToIdMap.get(normalizedName);
} else {
- Collation suggestion = Collections.min(List.of(collationTable),
Comparator.comparingInt(
Review Comment:
The following logic is the same as the method `getClosestCollation`.
--
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]