julianhyde commented on code in PR #3460:
URL: https://github.com/apache/calcite/pull/3460#discussion_r1355659197
##########
core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java:
##########
@@ -546,8 +548,8 @@ 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,
- methodName) || regex.isEmpty()) {
+ if (regex.isEmpty() || !validatePosOccurrenceParamValues(position,
occurrence,
+ occurrencePosition, value, methodName)) {
Review Comment:
Put `||` on a new line.
(Multi-line expressions shouldn't cross 'branches' of the expression tree in
the middle of a line.)
--
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]