ivandasch commented on code in PR #10332:
URL: https://github.com/apache/ignite/pull/10332#discussion_r999328462
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/util/RexUtils.java:
##########
@@ -592,6 +595,19 @@ private static Map<Integer, List<RexCall>>
mapPredicatesToFields(RexNode conditi
return res;
}
+ /** */
Review Comment:
```
private static RexNode expandBooleanFieldComparison(RexNode rexNode,
RexBuilder builder) {
if (rexNode instanceof RexSlot)
return builder.makeCall(SqlStdOperatorTable.EQUALS, rexNode,
builder.makeLiteral(true));
else if (rexNode instanceof RexCall && rexNode.getKind() == NOT &&
(rexNode = ((RexCall)rexNode).getOperands().get(0)) instanceof
RexSlot)
return builder.makeCall(SqlStdOperatorTable.EQUALS, rexNode,
builder.makeLiteral(false));
return rexNode;
```
It seems that it is less verbose
--
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]