jovanpavl-db commented on PR #49186: URL: https://github.com/apache/spark/pull/49186#issuecomment-2543556760
@stefankandic it is improvement, equally as using lazy val. By `stringType.collationId == CollationFactory.UTF8_BINARY_COLLATION_ID`, there is no fetching of collation at all (by collationId), just comparing 2 integers which should be pretty same as comparing boolean (supportsBinaryEquality with true). Issue with current implementation is that we always need to fetch Collation from collationId to check simple boolean flag and that part of fetching Collation is the expensive one. But this is the way it worked before (adding rtrim collation), I added one more condition so it made it fetch 2 times (once for supportsBinaryEquality, once for supportsTrimCollation). -- 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]
