davecromberge commented on code in PR #17825:
URL: https://github.com/apache/pinot/pull/17825#discussion_r2911249144


##########
pinot-core/src/main/java/org/apache/pinot/core/segment/processing/reducer/RollupReducer.java:
##########
@@ -106,6 +116,32 @@ private GenericRowFileManager doReduce()
     long rollupFileCreationStartTimeMs = System.currentTimeMillis();
     _rollupFileManager = new GenericRowFileManager(partitionOutputDir, 
fieldSpecs, includeNullFields, 0);
     GenericRowFileWriter rollupFileWriter = _rollupFileManager.getFileWriter();
+
+    // Check if any aggregators support batch aggregation
+    boolean useBatchAggregation = aggregatorContextList.stream()
+        .anyMatch(ctx -> ctx._aggregator.supportsBatchAggregation());
+
+    if (useBatchAggregation) {
+      LOGGER.info("Using batch aggregation for partition: {}", _partitionId);
+      reduceBatch(recordReader, numRows, aggregatorContextList, 
rollupFileWriter, includeNullFields);
+    } else {
+      reducePairwise(recordReader, numRows, aggregatorContextList, 
rollupFileWriter, includeNullFields);
+    }

Review Comment:
   See commit 
https://github.com/apache/pinot/pull/17825/changes/365c25ecd8d09bce084e367d7f118e1774286421



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