danny0405 commented on a change in pull request #1401: [CALCITE-3280] Add 
regexp_replace function (Shuming Li)
URL: https://github.com/apache/calcite/pull/1401#discussion_r316544139
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
 ##########
 @@ -313,6 +313,16 @@ private SqlLibraryOperators() {
           OperandTypes.INTEGER,
           SqlFunctionCategory.STRING);
 
+  @LibraryOperator(libraries = {MYSQL, POSTGRESQL, ORACLE})
+  public static final SqlFunction REGEXP_REPLACE =
+      new SqlFunction("REGEXP_REPLACE",
+          SqlKind.OTHER_FUNCTION,
+          ReturnTypes.cascade(ReturnTypes.explicit(SqlTypeName.VARCHAR),
+              SqlTypeTransforms.TO_NULLABLE),
 
 Review comment:
   It would be nice if we support a MYSQL style `REGEXP_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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to