uros-db commented on code in PR #45216: URL: https://github.com/apache/spark/pull/45216#discussion_r1505460392
########## common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java: ########## @@ -105,6 +105,9 @@ public Collation( private static final Collation[] collationTable = new Collation[4]; private static final HashMap<String, Integer> collationNameToIdMap = new HashMap<>(); + public static final int DEFAULT_COLLATION_ID = 0; + public static final int LOWERCASE_COLLATION_ID = 1; Review Comment: for now, `DEFAULT_COLLATION_ID ` is mostly used outside of CollationFactory (e.g. StringType, ColumnType, PhysicalDataType), so there's not too many places where a "0" is hardcoded instead while I suppose we could also do `collationTable[DEFAULT_COLLATION_ID] = ...`, it wouldn't really make too much sense as only `0` and `1` are special cases (while `2`, `3`, and so on are not), and I also suppose collationTable initialization itself will evolve soon with respect to other collation types so it hardly matters that said, I could change it for now? -- 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]
