mihailom-db commented on code in PR #47364:
URL: https://github.com/apache/spark/pull/47364#discussion_r1751410939
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -88,12 +90,45 @@ public Optional<String> getVersion() {
}
}
+ public record CollationMeta(
+ String catalog,
+ String schema,
+ String collationName,
+ String language,
+ String country,
+ String icuVersion,
+ String padAttribute,
+ boolean accentSensitivity,
+ boolean caseSensitivity) {
+
+ public static CollationMeta fromCollation(
+ String catalog, String schema, Collation collation) {
+ return new CollationMeta(
+ catalog,
+ schema,
+ collation.collationName,
+ collation.language,
+ collation.country,
+ collation.icuVersion,
+ collation.padAttribute,
+ collation.accentSensitivity,
+ collation.caseSensitivity);
+ }
+ }
+
/**
* Entry encapsulating all information about a collation.
*/
public static class Collation {
+
public final String collationName;
public final String provider;
+ public final String language;
+ public final String country;
+ public final String icuVersion;
+ public final String padAttribute;
+ public final boolean accentSensitivity;
+ public final boolean caseSensitivity;
Review Comment:
Yeah, I would say this is better than building Collation objects. But we can
keep the filtering inside of SessionCatalog so we do not have to reimplement
filter again, but use StringUtils functionality.
--
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]