adamkennedy commented on code in PR #3757:
URL: https://github.com/apache/calcite/pull/3757#discussion_r1565183866


##########
core/src/main/java/org/apache/calcite/tools/RelBuilder.java:
##########
@@ -2502,9 +2502,10 @@ private RelBuilder 
pruneAggregateInputFieldsAndDeduplicateAggCalls(
           newProjects.add(project.getProjects().get(i));
           builder.add(project.getRowType().getFieldList().get(i));
         }
+
         r =
-            project.copy(cluster.traitSet(), project.getInput(), newProjects,
-                builder.build());
+            project.copy(project.getTraitSet().apply(targetMapping), 
project.getInput(),

Review Comment:
   Is that correct mapping to use? That looks like a mapping for the Aggregate 
calls, not a mapping for the adjustments to the underlying Project. Can we 
actually reuse that one safely?



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