You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "snuyanzin (via GitHub)" <gi...@apache.org> on 2023/03/31 10:14:18 UTC

[GitHub] [flink] snuyanzin commented on a diff in pull request #20342: [FLINK-26939][Table SQL/API] Add TRANSLATE supported in SQL & Table API

snuyanzin commented on code in PR #20342:
URL: https://github.com/apache/flink/pull/20342#discussion_r1154293981


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java:
##########
@@ -371,6 +371,11 @@ public static String repeat(String str, int repeat) {
         return EncodingUtils.repeat(str, repeat);
     }
 
+    /** Returns an expr where all characters in from have been replaced with those in to. */
+    public static String translate3(String str, String search, String replacement) {
+        return org.apache.commons.lang3.StringUtils.replaceChars(str, search, replacement);

Review Comment:
   I didn't say to use `StringUtils#replace` I asked about usage of `replace` from this class `SqlFunctionUtils#replace`



-- 
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: issues-unsubscribe@flink.apache.org

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