xtern commented on code in PR #2671:
URL: https://github.com/apache/ignite-3/pull/2671#discussion_r1363639990


##########
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:
   >  there is no need to process null`s here, 
   
   Why, then, are you processing them in the conditional branch?
   ```
               if (node != null) {
                   programBuilder.addProject(node, null);
               } else {
                   assert false : "unexpected nullable node";
               }
   ```
   > so I prefer to stay with this check
   
   With what check - `else assert false`?



-- 
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]

Reply via email to