Jackie-Jiang commented on code in PR #10646:
URL: https://github.com/apache/pinot/pull/10646#discussion_r1171954741
##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/RequestContextUtils.java:
##########
@@ -205,7 +205,7 @@ public static FilterContext getFilter(Function
thriftFunction) {
case LIKE:
return new FilterContext(FilterContext.Type.PREDICATE, null,
new RegexpLikePredicate(getExpression(operands.get(0)),
-
RegexpPatternConverterUtils.likeToRegexpLike(getStringValue(operands.get(1)))));
+
RegexpPatternConverterUtils.likeToRegexpLike(getStringValue(operands.get(1))),
""));
Review Comment:
This is not the correct fix because we don't really handle the `ILIKE` key
word
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/StringFunctions.java:
##########
@@ -751,15 +751,41 @@ public static String regexpReplace(String inputStr,
String matchStr, String repl
return regexpReplace(inputStr, matchStr, replaceStr, matchStartPos,
occurence, "");
}
+ @ScalarFunction(names = {"regexpLike", "regexp_like"})
+ public static boolean regexpLike(String inputStr, String regexPatternStr,
String flag) {
Review Comment:
Any specific reason why we pass in a string flag instead of a boolean
`caseInsensitive`?
--
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]