LiBinfeng-01 commented on code in PR #49087:
URL: https://github.com/apache/doris/pull/49087#discussion_r2000333237


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/StringArithmetic.java:
##########
@@ -659,6 +666,27 @@ public static Expression space(IntegerLiteral first) {
         return new VarcharLiteral(sb.toString());
     }
 
+    /**
+     * split by char by empty string considering emoji
+     * @param first input string to be split
+     * @return ArrayLiteral
+     */
+    public static Expression splitByGrapheme(StringLikeLiteral first) {
+        List<String> result = new ArrayList<>();
+        int length = first.getValue().length();
+        for (int i = 0; i < length; ) {
+            int codePoint = first.getValue().codePointAt(i);
+            int charCount = Character.charCount(codePoint);
+            result.add(first.getValue().substring(i, i + charCount));

Review Comment:
   can not do this because castStringLikeLiteral only accept expression as 
output, and result can not use List<Expression> type



-- 
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: commits-unsubscr...@doris.apache.org

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


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

Reply via email to