dssysolyatin commented on code in PR #4385:
URL: https://github.com/apache/calcite/pull/4385#discussion_r2094489355
##########
core/src/main/java/org/apache/calcite/plan/Strong.java:
##########
@@ -237,6 +239,15 @@ public boolean isNull(RexNode node) {
}
}
return allNull(caseValues);
+ case SEARCH:
+ final RexCall searchCall = (RexCall) node;
+ boolean isNull = isNull(searchCall.getOperands().get(0));
+ if (isNull) {
+ final Sarg<?> sarg = ((RexLiteral)
searchCall.getOperands().get(1)).getValueAs(Sarg.class);
+ assert sarg != null;
Review Comment:
If you need to check whether a value is null, use requireNonNull or another
approach instead of assert. (See
https://issues.apache.org/jira/browse/CALCITE-6552)
--
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]