You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/06/19 01:08:28 UTC

[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #5579: [QueryContext] Use QueryContext in all PlanNodes

Jackie-Jiang commented on a change in pull request #5579:
URL: https://github.com/apache/incubator-pinot/pull/5579#discussion_r442579009



##########
File path: pinot-core/src/main/java/org/apache/pinot/core/plan/AggregationGroupByOrderByPlanNode.java
##########
@@ -48,22 +49,23 @@
   private final TransformPlanNode _transformPlanNode;
   private final StarTreeTransformPlanNode _starTreeTransformPlanNode;
 
-  public AggregationGroupByOrderByPlanNode(IndexSegment indexSegment, BrokerRequest brokerRequest,
+  public AggregationGroupByOrderByPlanNode(IndexSegment indexSegment, QueryContext queryContext,
       int maxInitialResultHolderCapacity, int numGroupsLimit) {
     _indexSegment = indexSegment;
     _maxInitialResultHolderCapacity = maxInitialResultHolderCapacity;
     _numGroupsLimit = numGroupsLimit;
-    _aggregationFunctions = AggregationFunctionUtils.getAggregationFunctions(brokerRequest);
-    List<String> groupByExpressions = brokerRequest.getGroupBy().getExpressions();
+    _aggregationFunctions = AggregationFunctionUtils.getAggregationFunctions(queryContext.getBrokerRequest());
+    List<ExpressionContext> groupByExpressions = queryContext.getGroupByExpressions();
+    assert groupByExpressions != null;
     int numGroupByExpressions = groupByExpressions.size();
     _groupByExpressions = new TransformExpressionTree[numGroupByExpressions];
     for (int i = 0; i < numGroupByExpressions; i++) {
-      _groupByExpressions[i] = TransformExpressionTree.compileToExpressionTree(groupByExpressions.get(i));
+      _groupByExpressions[i] = groupByExpressions.get(i).toTransformExpressionTree();

Review comment:
       Yes, that is correct, and will be done in the following PRs when replacing BrokerRequest in the functions (aggregation, transform).




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

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



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