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


##########
core/src/test/java/org/apache/calcite/test/SqlFunctionsTest.java:
##########
@@ -234,6 +235,34 @@ static <E> List<E> list() {
     assertThat(posixRegex("abcq", "[[:xdigit:]]", false), is(true));
   }
 
+  @Test void testRegexpContains() {
+    try {
+      regexpContains("abc def ghi", "(abc");
+      fail("'regexp_contains' on an invalid regex input '(abc' is not 
possible");
+    } catch (CalciteException e) {
+      assertThat(e.getMessage(),
+          is("Invalid regex input for REGEXP_CONTAINS: 'Unclosed group near 
index 4\n(abc'"));

Review Comment:
   Converted into Runtime Exceptions and corrected \n formatting.



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