walterddr commented on code in PR #11036:
URL: https://github.com/apache/pinot/pull/11036#discussion_r1254825251
##########
pinot-query-planner/src/main/java/org/apache/calcite/rel/hint/PinotHintOptions.java:
##########
@@ -29,12 +29,28 @@ public class PinotHintOptions {
public static final String AGGREGATE_HINT_OPTIONS = "aggOptions";
public static final String JOIN_HINT_OPTIONS = "joinOptions";
+ /**
+ * Hint to denote that the aggregation node is the final aggregation stage
which extracts the final result.
+ */
+ public static final String INTERNAL_AGG_OPTIONS = "aggOptionsInternal";
+
private PinotHintOptions() {
// do not instantiate.
}
+ public static class InternalAggregateOptions {
+ public static final String AGG_TYPE = "agg_type";
+ public enum AggType {
Review Comment:
will do in the next iteration. having boolean method is not that useful IMO
b/c there's still 4 combination
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/plannode/AggregateNode.java:
##########
@@ -115,29 +72,13 @@ public List<RelHint> getRelHints() {
return _relHints;
}
- public AggregationStage getAggregationStage() {
- return _aggregationStage;
- }
-
- public boolean isTreatIntermediateStageAsLeaf() {
- return _treatIntermediateStageAsLeaf;
- }
-
- public boolean isFinalStage() {
- return _aggregationStage == AggregationStage.FINAL;
- }
-
- public boolean isIntermediateStage() {
- return _aggregationStage == AggregationStage.INTERMEDIATE;
- }
-
- public boolean isLeafStage() {
- return _aggregationStage == AggregationStage.LEAF;
+ public PinotHintOptions.InternalAggregateOptions.AggType getAggType() {
+ return _aggType;
}
@Override
public String explain() {
- return "AGGREGATE";
+ return "AGGREGATE" + _aggType;
Review Comment:
good idea
--
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]