xtern commented on code in PR #2671:
URL: https://github.com/apache/ignite-3/pull/2671#discussion_r1363671004
##########
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:
Perhaps I wasn't clear enough.
I'm just suggesting to replace this code block
```
for (int i = 0; i < nodes.size(); i++) {
RexNode node = nodes.get(i);
if (node != null) {
programBuilder.addProject(node, null);
} else {
assert false : "unexpected nullable node";
}
}
```
with this one
```
for (RexNode node : nodes) {
assert node != null : "unexpected nullable node";
programBuilder.addProject(node, null);
}
```
Why you don't like it?)
What fundamental differences do you see with the current behavior?
--
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]