somandal commented on code in PR #10845:
URL: https://github.com/apache/pinot/pull/10845#discussion_r1230366679


##########
pinot-query-planner/src/main/java/org/apache/calcite/rel/hint/PinotHintStrategyTable.java:
##########
@@ -29,6 +29,9 @@
 public class PinotHintStrategyTable {
   public static final String INTERNAL_AGG_INTERMEDIATE_STAGE = 
"aggIntermediateStage";
   public static final String INTERNAL_AGG_FINAL_STAGE = "aggFinalStage";
+  // Hint to denote that aggregation is to be run as a single stage rather 
than split into an intermediate and a final
+  // stage
+  public static final String INTERNAL_IS_SINGLE_STAGE_AGG = "isSingleStageAgg";

Review Comment:
   @walterddr this will make more sense once you look at this PR: 
https://github.com/apache/pinot/pull/10846
   
   We cannot leverage the final stage hint because we use that to decide when 
to use the singleton exchange for aggregations without group-by (to perform 
global aggregation step in final). For both of the aggregation hints, skip leaf 
aggregation, and partition keys = group by keys, we run the aggregation as a 
single stage and must treat the incoming records as the intermediate stage and 
not the final stage. That's why we decided to expose this new hint for these 
scenarios. We also cannot change the final stage hint to intermediate stage 
hint for single stage aggregations because of the need for the singleton 
exchange.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to