dbatomic commented on code in PR #45436:
URL: https://github.com/apache/spark/pull/45436#discussion_r1519437339
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -138,11 +138,13 @@ public Collation(
collationTable[2] = new Collation(
"UNICODE", Collator.getInstance(ULocale.ROOT), "153.120.0.0", true);
collationTable[2].collator.setStrength(Collator.TERTIARY);
+ collationTable[2].collator.freeze();
Review Comment:
Yeah, as soon as we get benchmarks working we should revisit this decision.
One option that we also prototyped is to keep `Collator` in `ThreadLocal`
fields, which also solved the problem. But `freeze` is a bit cleaner and we
don't have microbenchmarks yet so we can't make data driven decision at this
point.
LGTM.
--
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]