Anthrino commented on code in PR #3460:
URL: https://github.com/apache/calcite/pull/3460#discussion_r1353303095
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -431,7 +433,7 @@ private static boolean checkPosOccurrenceParamValues(int
position,
throw
RESOURCE.invalidIntegerInputForRegexpFunctions(Integer.toString(occurrencePosition),
"occurrence_position", methodName).ex();
}
- if (position <= value.length()) {
+ if (position > value.length()) {
Review Comment:
This wasn't wrong before, I just inverted the condition to make the return
boolean more intuitive wrt helper function name:
validatePosOccurrenceParamValues(), now true if everything is valid and false
otherwise.
I've inverted the boolean checks for this method usages below, if you think
this is more confusing we can revert to original.
--
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]