siddharthteotia commented on code in PR #10248:
URL: https://github.com/apache/pinot/pull/10248#discussion_r1118302074


##########
pinot-query-planner/src/main/java/org/apache/calcite/rel/hint/PinotHintStrategyTable.java:
##########
@@ -18,19 +18,36 @@
  */
 package org.apache.calcite.rel.hint;
 
+import com.google.common.collect.ImmutableList;
+
+
 /**
  * Default hint strategy set for Pinot query.
  */
 public class PinotHintStrategyTable {
   public static final String INTERNAL_AGG_INTERMEDIATE_STAGE = 
"aggIntermediateStage";
   public static final String INTERNAL_AGG_FINAL_STAGE = "aggFinalStage";
 
+  public static final String SKIP_LEAF_STAGE_GROUP_BY_AGGREGATION = 
"skipLeafStageGroupByAggregation";
+
+
+
   private PinotHintStrategyTable() {
     // do not instantiate.
   }
 
   public static final HintStrategyTable PINOT_HINT_STRATEGY_TABLE = 
HintStrategyTable.builder()
       .hintStrategy(INTERNAL_AGG_INTERMEDIATE_STAGE, HintPredicates.AGGREGATE)
       .hintStrategy(INTERNAL_AGG_FINAL_STAGE, HintPredicates.AGGREGATE)
+      .hintStrategy(SKIP_LEAF_STAGE_GROUP_BY_AGGREGATION, 
HintPredicates.AGGREGATE)
       .build();
+
+  public static boolean containsHint(ImmutableList<RelHint> hintList, String 
hintName) {
+    for (RelHint relHint : hintList) {
+      if (relHint.hintName.equals(hintName)) {

Review Comment:
   (nit) not a big deal but if invoked multiple times, may be hintList should 
be a `Set` I guess



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