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


##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -546,7 +548,7 @@ public int regexpInstr(String value, String regex, int 
position,
       final String methodName = "REGEXP_INSTR";
       final Pattern pattern = validateRegexPattern(regex, methodName);
 
-      if (checkPosOccurrenceParamValues(position, occurrence, 
occurrencePosition, value,
+      if (!validatePosOccurrenceParamValues(position, occurrence, 
occurrencePosition, value,
           methodName) || regex.isEmpty()) {

Review Comment:
   Yes that makes sense, there isn't a very costly operation hidden behind the 
function but you're right as to using this pattern, corrected. 



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