MaxGekk commented on code in PR #48739:
URL: https://github.com/apache/spark/pull/48739#discussion_r1855172770
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationAwareUTF8String.java:
##########
@@ -1530,20 +1530,29 @@ public static UTF8String trimRight(
public static UTF8String[] splitSQL(final UTF8String input, final UTF8String
delim,
final int limit, final int collationId) {
- if (CollationFactory.fetchCollation(collationId).isUtf8BinaryType) {
+ CollationFactory.Collation collation =
CollationFactory.fetchCollation(collationId);
+ if(collation.isUtf8BinaryType && !collation.supportsSpaceTrimming){
Review Comment:
```suggestion
if (collation.isUtf8BinaryType && !collation.supportsSpaceTrimming){
```
##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java:
##########
@@ -37,13 +37,15 @@ public final class CollationSupport {
public static class StringSplitSQL {
public static UTF8String[] exec(final UTF8String s, UTF8String d, final
int collationId) {
CollationFactory.Collation collation =
CollationFactory.fetchCollation(collationId);
- if (collation.supportsSpaceTrimming) {
- d = CollationFactory.applyTrimmingPolicy(d, collationId);
+ if(collation.isUtf8BinaryType && !collation.supportsSpaceTrimming){
Review Comment:
```suggestion
if (collation.isUtf8BinaryType && !collation.supportsSpaceTrimming){
```
--
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]