dbatomic commented on code in PR #46732:
URL: https://github.com/apache/spark/pull/46732#discussion_r1625746851
##########
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:
empty line between methods (other places as well)
--
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]