Jackie-Jiang commented on code in PR #11607:
URL: https://github.com/apache/pinot/pull/11607#discussion_r1329117658


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/AggregateOperator.java:
##########
@@ -117,31 +96,34 @@ public AggregateOperator(OpChainExecutionContext context, 
MultiStageOperator inp
       _aggCallSignatureMap = Collections.emptyMap();
     }
 
-    _hasReturnedAggregateBlock = false;
+    // Initialize the aggregation functions
     _colNameToIndexMap = new HashMap<>();
-
-    // Convert groupSet to ExpressionContext that our aggregation functions 
understand.
-    List<ExpressionContext> groupByExpr = getGroupSet(groupSet);
-
     List<FunctionContext> functionContexts = getFunctionContexts(aggCalls);
-    AggregationFunction[] aggFunctions = new 
AggregationFunction[functionContexts.size()];
-
-    for (int i = 0; i < functionContexts.size(); i++) {
+    int numFunctions = functionContexts.size();
+    AggregationFunction<?, ?>[] aggFunctions = new 
AggregationFunction[numFunctions];
+    for (int i = 0; i < numFunctions; i++) {
       aggFunctions[i] = 
AggregationFunctionFactory.getAggregationFunction(functionContexts.get(i), 
true);
     }
 
+    // Process the filter argument indices
+    int[] filterArgIds = new int[numFunctions];
+    int maxFilterArgId = -1;

Review Comment:
   I got confused initially as well, then find it is never empty from RelNode. 
Added max filter arg id to help quickly identify whether there is filter, and 
to create the cache



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