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


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/exp/ExpressionFactoryImpl.java:
##########
@@ -746,6 +735,25 @@ public T get() {
         }
     }
 
+    private static Map.Entry<List<RexNode>, RelDataType> 
shrinkBounds(IgniteTypeFactory factory, List<RexNode> bound, RelDataType 
rowType) {
+        ArrayList<RexNode> lowerInit = new ArrayList<>(bound);
+        ImmutableList.Builder<RexNode> lowerBuilder = ImmutableList.builder();
+        ImmutableList.Builder<RelDataType> typesBuilder = 
ImmutableList.builder();
+        List<RelDataType> types = RelOptUtil.getFieldTypeList(rowType);
+        int i = 0;
+        for (RexNode node : lowerInit) {
+            if (node != null) {
+                typesBuilder.add(types.get(i));
+                lowerBuilder.add(node);
+            }
+            ++i;
+        }

Review Comment:
   ```suggestion
           ImmutableList.Builder<RexNode> lowerBuilder = 
ImmutableList.builder();
           ImmutableList.Builder<RelDataType> typesBuilder = 
ImmutableList.builder();
           List<RelDataType> types = RelOptUtil.getFieldTypeList(rowType);
           for (int i = 0; i < bound.size(); i++) {
               RexNode node = bound.get(i);
   
               if (node != null) {
                   typesBuilder.add(types.get(i));
                   lowerBuilder.add(node);
               }
           }
   ```



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