Jackie-Jiang commented on code in PR #19417:
URL: https://github.com/apache/pinot/pull/19417#discussion_r3899047731
##########
pinot-core/src/main/java/org/apache/pinot/core/plan/CombinePlanNode.java:
##########
@@ -130,10 +130,12 @@ private BaseCombineOperator getCombineOperator() {
// Use streaming operator only for non-empty selection-only query
return new StreamingSelectionOnlyCombineOperator(operators,
_queryContext, _executorService);
}
+ // Streaming flushes partial aggregates, so it needs an aggregation
above to merge them back together.
+ // Leaves that must return final results are excluded, see
StreamingGroupByCombineOperator.
int flushThreshold = _queryContext.getStreamingGroupByFlushThreshold();
if (flushThreshold > 0 &&
QueryContextUtils.isAggregationQuery(_queryContext)
- && _queryContext.getGroupByExpressions() != null) {
- // Use streaming group-by operator for MSE leaf stages with flush
threshold
+ && _queryContext.getGroupByExpressions() != null &&
!_queryContext.isServerReturnFinalResult()
+ && !_queryContext.isServerReturnFinalResultKeyUnpartitioned()) {
Review Comment:
(nit) Consider separating each `&&` into a separate line for readability
##########
pinot-core/src/main/java/org/apache/pinot/core/plan/CombinePlanNode.java:
##########
@@ -130,10 +130,12 @@ private BaseCombineOperator getCombineOperator() {
// Use streaming operator only for non-empty selection-only query
return new StreamingSelectionOnlyCombineOperator(operators,
_queryContext, _executorService);
}
+ // Streaming flushes partial aggregates, so it needs an aggregation
above to merge them back together.
+ // Leaves that must return final results are excluded, see
StreamingGroupByCombineOperator.
int flushThreshold = _queryContext.getStreamingGroupByFlushThreshold();
if (flushThreshold > 0 &&
QueryContextUtils.isAggregationQuery(_queryContext)
- && _queryContext.getGroupByExpressions() != null) {
- // Use streaming group-by operator for MSE leaf stages with flush
threshold
+ && _queryContext.getGroupByExpressions() != null &&
!_queryContext.isServerReturnFinalResult()
Review Comment:
How about the new added grouping sets?
--
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]