miland-db commented on code in PR #45725:
URL: https://github.com/apache/spark/pull/45725#discussion_r1546053240


##########
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java:
##########
@@ -863,6 +914,70 @@ private int rfind(UTF8String str, int start) {
     return -1;
   }
 
+  /**
+   * Find the `str` from right to left considering different collations.
+   */
+  private int rfind(UTF8String str, int start, int collationId) {
+    if (CollationFactory.fetchCollation(collationId).supportsBinaryEquality) {
+      return this.rfind(str, start);
+    }
+    if(collationId == CollationFactory.UTF8_BINARY_LCASE_COLLATION_ID) {
+      return rfindLowercase(str, start);
+    }
+    return collatedRFind(str, start, collationId);
+  }
+
+  /**
+   * Find the `str` from left to right considering binary lowercase collation.
+   */
+  private int rfindLowercase(UTF8String str, int start) {

Review Comment:
   Sure, but I think that we still don't have real case insensitive support. 
When we implement this kind of collator, we can change this code later.



-- 
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]

Reply via email to