hsyuan commented on a change in pull request #1451: [CALCITE-3334] Refinement 
for Substitution-Based MV Matching
URL: https://github.com/apache/calcite/pull/1451#discussion_r338198893
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/plan/SubstitutionVisitor.java
 ##########
 @@ -1287,7 +1810,19 @@ public static MutableRel 
unifyAggregates(MutableAggregate query,
         }
         projects.add(groupCount + i);
       }
-      result = MutableRels.createProject(target, projects);
+
+      List<RexNode> compenProjs = new AbstractList<RexNode>() {
+        public int size() {
+          return projects.size();
+        }
+        public RexNode get(int index) {
+          final int pos = projects.get(index);
+          return RexInputRef.of(pos, target.rowType);
+        }
+      };
 
 Review comment:
   How about using `createProjectExprs()`?

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