walterddr commented on a change in pull request #7114:
URL: https://github.com/apache/pinot/pull/7114#discussion_r711206552



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/StringFunctions.java
##########
@@ -179,6 +180,48 @@ public static String rtrim(String input) {
     return RTRIM.matcher(input).replaceAll("");
   }
 
+  /**
+   * @see #StringFunctions#regexpExtract(String, String, int, String)
+   * @param value
+   * @param regexp
+   * @return the matched result.
+   */
+  @ScalarFunction
+  public static String regexpExtract(String value, String regexp) {
+    return regexpExtract(value, regexp, 0, "");
+  }
+
+  /**
+   * @see #StringFunctions#regexpExtract(String, String, int, String) 
+   * @param value 
+   * @param regexp
+   * @param group 
+   * @return the matched result.
+   */
+  @ScalarFunction
+  public static String regexpExtract(String value, String regexp, int group) {
+    return regexpExtract(value, regexp, group, "");
+  }
+
+  /**
+   * Regular expression extract that accepts starting position and i-th 
occurrence as argument.

Review comment:
       ```suggestion
      * Regular expression that extract first matched substring.
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to