miland-db commented on code in PR #45643:
URL: https://github.com/apache/spark/pull/45643#discussion_r1555394471
##########
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java:
##########
@@ -549,6 +549,51 @@ public int findInSet(UTF8String match) {
return 0;
}
+ public int findInSet(UTF8String match, int collationId) {
+ if (CollationFactory.fetchCollation(collationId).supportsBinaryEquality) {
+ return this.findInSet(match);
+ }
+ if (collationId == CollationFactory.UTF8_BINARY_LCASE_COLLATION_ID) {
Review Comment:
We can solve this in the same way we did i t here:
[STRING_LOCATE](https://github.com/apache/spark/pull/45791). In the next PRs we
updated `CollationFactory` to be able to return "lowercase collator" so we can
unify the way we deal with collated strings. If you prefer, I can update this
PR with that change.
##########
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java:
##########
@@ -549,6 +549,51 @@ public int findInSet(UTF8String match) {
return 0;
}
+ public int findInSet(UTF8String match, int collationId) {
+ if (CollationFactory.fetchCollation(collationId).supportsBinaryEquality) {
+ return this.findInSet(match);
+ }
+ if (collationId == CollationFactory.UTF8_BINARY_LCASE_COLLATION_ID) {
Review Comment:
We can solve this in the same way we did it here:
[STRING_LOCATE](https://github.com/apache/spark/pull/45791). In the next PRs we
updated `CollationFactory` to be able to return "lowercase collator" so we can
unify the way we deal with collated strings. If you prefer, I can update this
PR with that change.
--
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]