dbatomic commented on code in PR #45216:
URL: https://github.com/apache/spark/pull/45216#discussion_r1498988909


##########
common/unsafe/src/main/java/org/apache/spark/sql/catalyst/util/CollationFactory.java:
##########
@@ -66,6 +66,13 @@ public static class Collation {
      */
     public final boolean isBinaryCollation;
 
+    /**
+     * Built-in string functions with collation support.

Review Comment:
   Instead of adding new functions here I would propose following:
   1) Add only low level basic functions here (e.g. matchAt).
   2) Extend UTF8String with   `public boolean startsWith(final UTF8String 
prefix, *collationId*)`.  Have all the routing happen there.
   3) Short circuit if we have `DEFAULT_COLLATION_ID` to previous 
implementation (e.g. (startsWith(final UTF8String prefix)). That way we will 
not risk regressing previous version.
   4) Have operators call startsWith/endsWith... with proper collationId.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to