Copilot commented on code in PR #16568:
URL: https://github.com/apache/pinot/pull/16568#discussion_r2265979703
##########
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/regexp/RegexpLikeVarFunctions.java:
##########
@@ -45,6 +45,6 @@ public static boolean regexpLikeVar(String inputStr, String
regexPatternStr, Str
@ScalarFunction
public static boolean likeVar(String inputStr, String likePatternStr) {
String regexPatternStr =
RegexpPatternConverterUtils.likeToRegexpLike(likePatternStr);
- return regexpLikeVar(inputStr, regexPatternStr);
+ return PatternFactory.compile(regexPatternStr,
true).matcher(inputStr).find(); // Case insensitive by default
Review Comment:
The direct use of PatternFactory.compile with case-insensitive flag bypasses
the existing regexpLikeVar function, creating inconsistent behavior. Consider
calling regexpLikeVar(inputStr, regexPatternStr, "i") instead to maintain
consistency with the regexp pattern matching approach used elsewhere.
```suggestion
return regexpLikeVar(inputStr, regexPatternStr, "i"); // Case
insensitive by default
```
--
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]