mihailom-db commented on code in PR #47364:
URL: https://github.com/apache/spark/pull/47364#discussion_r1751555879
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -428,6 +461,52 @@ protected Collation buildCollation() {
/* supportsLowercaseEquality = */ true);
}
}
+
+ @Override
+ protected CollationMeta buildCollationMeta() {
+ if (collationId == UTF8_BINARY_COLLATION_ID) {
+ return new CollationMeta(
+ CATALOG,
+ SCHEMA,
+ UTF8_BINARY_COLLATION_NAME,
+ /* language = */ null,
+ /* country = */ null,
+ /* icuVersion = */ null,
+ COLLATION_PAD_ATTRIBUTE,
+ /* accentSensitivity = */ true,
+ /* caseSensitivity = */ true);
+ } else {
+ return new CollationMeta(
+ CATALOG,
+ SCHEMA,
+ UTF8_LCASE_COLLATION_NAME,
+ /* language = */ null,
+ /* country = */ null,
+ /* icuVersion = */ null,
+ COLLATION_PAD_ATTRIBUTE,
+ /* accentSensitivity = */ true,
+ /* caseSensitivity = */ false);
+ }
+ }
+
+ static List<CollationIdentifier> listCollations() {
+ CollationIdentifier UTF8_BINARY_COLLATION_IDENT =
+ new CollationIdentifier(PROVIDER_SPARK, UTF8_BINARY_COLLATION_NAME,
null);
Review Comment:
Let's return the true version here which is 1.0, but for show collations we
can filter to put null for ICU_VERSION.
--
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]