xtern commented on code in PR #2671:
URL: https://github.com/apache/ignite-3/pull/2671#discussion_r1363646414
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/ExpressionFactoryImpl.java:
##########
@@ -487,18 +534,13 @@ private Scalar compile(List<RexNode> nodes, RelDataType
type, boolean biInParams
RexProgramBuilder programBuilder = new RexProgramBuilder(type,
rexBuilder);
- BitSet unspecifiedValues = new BitSet(nodes.size());
-
for (int i = 0; i < nodes.size(); i++) {
RexNode node = nodes.get(i);
if (node != null) {
programBuilder.addProject(node, null);
} else {
- unspecifiedValues.set(i);
-
- programBuilder.addProject(rexBuilder.makeNullLiteral(type ==
emptyType
- ? nullType : type.getFieldList().get(i).getType()),
null);
+ assert false : "unexpected nullable node";
Review Comment:
My proposal about code cleanup is to replace for-loop with the following:
```
for (RexNode node : nodes) {
assert node != null : "unexpected nullable node";
programBuilder.addProject(node, null);
}
```
--
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]