hsyuan commented on a change in pull request #1346: [CALCITE-3223] 
Non-RexInputRef may fails the matching of FilterToProjectUnifyRule during 
'invert' by mistake
URL: https://github.com/apache/calcite/pull/1346#discussion_r312258025
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
 ##########
 @@ -1130,20 +1130,23 @@ protected MutableRel invert(MutableRel model, 
MutableRel input,
       }
       final List<RexNode> exprList = new ArrayList<>();
       final RexBuilder rexBuilder = model.cluster.getRexBuilder();
-      for (RelDataTypeField field : model.rowType.getFieldList()) {
-        exprList.add(rexBuilder.makeZeroLiteral(field.getType()));
+      for (int i = 0; i < model.rowType.getFieldCount(); i++) {
+        exprList.add(null);
 
 Review comment:
   Worth adding a comment to explain the intent of doing this.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to