uros-db commented on code in PR #45856:
URL: https://github.com/apache/spark/pull/45856#discussion_r1565989321


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationSupport.java:
##########
@@ -143,6 +143,40 @@ public static boolean execICU(final UTF8String l, final 
UTF8String r,
    * Collation-aware regexp expressions.
    */
 
+  public static class StringSplit {
+    public static UTF8String[] exec(final UTF8String string, final UTF8String 
regex,
+        final int limit, final int collationId) {
+      CollationFactory.Collation collation = 
CollationFactory.fetchCollation(collationId);
+      if (collation.supportsBinaryEquality) {
+        return execBinary(string, regex, limit);
+      } else {
+        return execLowercase(string, regex, limit);

Review Comment:
   I think `final lazy val collationId: Int = 
str.dataType.asInstanceOf[StringType].collationId` for `StringTypeBinaryLcase` 
won't allow that to happen. But an additional assert in the else branch 
couldn't hurt too



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