uros-db commented on code in PR #48521:
URL: https://github.com/apache/spark/pull/48521#discussion_r1806406326
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java:
##########
@@ -500,9 +502,12 @@ public static UTF8String exec(final UTF8String srcString) {
}
public static UTF8String exec(
final UTF8String srcString,
- final UTF8String trimString,
+ UTF8String trimString,
final int collationId) {
CollationFactory.Collation collation =
CollationFactory.fetchCollation(collationId);
+ if(collation.supportsSpaceTrimming) {
+ trimString = CollationFactory.applyTrimmingPolicy(trimString,
collationId);
Review Comment:
I don't think this is the behaviour that we want - iiuc, you're trimming
away spaces from the trimString (i.e. the users specifies that they want to
trim spaces, and you revoke that given the collation spec - which is incorrect)
--
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]