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_r317450773
##########
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:
I updated the codes as you said by following the `Mysql`'s style.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services