xiangfu0 commented on a change in pull request #7550:
URL: https://github.com/apache/pinot/pull/7550#discussion_r726493248
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/plan/AggregationGroupByOrderByPlanNode.java
##########
@@ -37,83 +38,70 @@
/**
* The <code>AggregationGroupByOrderByPlanNode</code> class provides the
execution plan for aggregation group-by
- * order-by query on a
- * single segment.
+ * order-by query on a single segment.
*/
@SuppressWarnings("rawtypes")
public class AggregationGroupByOrderByPlanNode implements PlanNode {
private final IndexSegment _indexSegment;
+ private final QueryContext _queryContext;
private final int _maxInitialResultHolderCapacity;
private final int _numGroupsLimit;
private final int _minGroupTrimSize;
- private final AggregationFunction[] _aggregationFunctions;
- private final ExpressionContext[] _groupByExpressions;
- private final TransformPlanNode _transformPlanNode;
- private final StarTreeTransformPlanNode _starTreeTransformPlanNode;
- private final QueryContext _queryContext;
public AggregationGroupByOrderByPlanNode(IndexSegment indexSegment,
QueryContext queryContext,
int maxInitialResultHolderCapacity, int numGroupsLimit, int
minGroupTrimSize) {
_indexSegment = indexSegment;
+ _queryContext = queryContext;
_maxInitialResultHolderCapacity = maxInitialResultHolderCapacity;
_numGroupsLimit = numGroupsLimit;
- Map<String, String> queryOptions = queryContext.getQueryOptions();
+ Map<String, String> queryOptions = _queryContext.getQueryOptions();
if (queryOptions != null) {
Integer minSegmentGroupTrimSize =
QueryOptions.getMinSegmentGroupTrimSize(queryOptions);
_minGroupTrimSize = minSegmentGroupTrimSize != null ?
minSegmentGroupTrimSize : minGroupTrimSize;
} else {
_minGroupTrimSize = minGroupTrimSize;
}
- _aggregationFunctions = queryContext.getAggregationFunctions();
- assert _aggregationFunctions != null;
- List<ExpressionContext> groupByExpressions =
queryContext.getGroupByExpressions();
- assert groupByExpressions != null;
- _groupByExpressions = groupByExpressions.toArray(new ExpressionContext[0]);
- _queryContext = queryContext;
+ }
- List<StarTreeV2> starTrees = indexSegment.getStarTrees();
- if (starTrees != null && !StarTreeUtils.isStarTreeDisabled(queryContext)) {
+ @Override
+ public AggregationGroupByOrderByOperator run() {
+ assert _queryContext.getAggregationFunctions() != null;
Review comment:
shall we move those asserts to constructor to on par with the behavior
before?
--
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]