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

 ##########
 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:
   Hi @danny0405 , Thanks for your replies. I have reviewed [other 
databases'](https://issues.apache.org/jira/browse/CALCITE-3280?focusedCommentId=16913081&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16913081)
 usage about `regexp_replace`. Maybe there is a final answer about this 
question.
   
   Do you think we should support this? I can work for it If it's needed.

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