walterddr commented on code in PR #11036:
URL: https://github.com/apache/pinot/pull/11036#discussion_r1254824434


##########
pinot-query-planner/src/main/java/org/apache/calcite/rel/rules/PinotAggregateExchangeNodeInsertRule.java:
##########
@@ -248,12 +227,12 @@ private RelNode makeNewIntermediateAgg(RelOptRuleCall 
ruleCall, Aggregate oldAgg
    */
   private static void convertIntermediateAggCall(RexBuilder rexBuilder, 
Aggregate oldAggRel, int oldCallIndex,
       AggregateCall oldCall, List<AggregateCall> newCalls, Map<AggregateCall, 
RexNode> aggCallMapping,
-      boolean isLeafStageAggregationPresent, List<Integer> argList, 
PinotLogicalExchange exchange) {
+      AggType aggType, List<Integer> argList, PinotLogicalExchange exchange) {
     final int nGroups = oldAggRel.getGroupCount();
     final SqlAggFunction oldAggregation = oldCall.getAggregation();
 
     List<Integer> newArgList;
-    if (isLeafStageAggregationPresent) {
+    if (AggType.INTERMEDIATE.equals(aggType) || AggType.FINAL.equals(aggType)) 
{

Review Comment:
   yeah i tried. this is not the same as "isLeafStage" b/c the treatment during 
process input block and produce output block as different. so it has to be 
directly comparing the types



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to