wnob commented on code in PR #3338:
URL: https://github.com/apache/calcite/pull/3338#discussion_r1295062657
##########
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java:
##########
@@ -475,6 +475,14 @@ static RelDataType deriveTypeSplit(SqlOperatorBinding
operatorBinding,
@LibraryOperator(libraries = {MYSQL, ORACLE})
public static final SqlFunction REGEXP_REPLACE = new
SqlRegexpReplaceFunction();
+ /** The "REGEXP_CONTAINS(value, regexp)" function.
+ * Returns TRUE if value is a partial match for the regular expression,
regexp. */
+ @LibraryOperator(libraries = {BIG_QUERY})
Review Comment:
BigQuery [uses re2][1] for their regex engine. Google has an [implementation
for Java][2]. We should use that here, both as a matter of syntax conformance
(since this is a BigQuery-specific function) and for the security reasons
outlined in the RE2J readme. This could be a follow-up, but I don't think we
should close the bug until that's done.
[1]:
https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains
[2]: https://github.com/google/re2j
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]