Anthrino commented on code in PR #3338:
URL: https://github.com/apache/calcite/pull/3338#discussion_r1291719259


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -401,6 +402,16 @@ private static int makeRegexpFlags(@Nullable String 
stringFlags) {
     return flags;
   }
 
+  /** SQL {@code REGEXP_CONTAINS(value, regexp)} function. */
+  public static boolean regexpContains(String value, String regex) {
+    try {
+      Pattern regexp = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);

Review Comment:
   Hi @mihaibudiu, this Pattern object is an instance of the java.util.regex 
library, it has almost complete overlap with BQ regex except for a few negative 
scenarios as highlighted on this ticket: 
[CALCITE-5910](https://issues.apache.org/jira/browse/CALCITE-5910)



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

Reply via email to