Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,20 @@ public class AggregationOperator extends BaseOperator<AggregationResultsBlock> {
private final long _numTotalDocs;

private int _numDocsScanned = 0;
protected final Object[] _preAggregatedResults;

public AggregationOperator(QueryContext queryContext, AggregationInfo aggregationInfo, long numTotalDocs) {
this(queryContext, aggregationInfo, numTotalDocs, null);
}

public AggregationOperator(QueryContext queryContext, AggregationInfo aggregationInfo, long numTotalDocs,
Object[] preAggregatedResults) {
_queryContext = queryContext;
_aggregationFunctions = queryContext.getAggregationFunctions();
_projectOperator = aggregationInfo.getProjectOperator();
_useStarTree = aggregationInfo.isUseStarTree();
_numTotalDocs = numTotalDocs;
_preAggregatedResults = preAggregatedResults;
}

@Override
Expand All @@ -67,7 +74,7 @@ protected AggregationResultsBlock getNextBlock() {
if (_useStarTree) {
aggregationExecutor = new StarTreeAggregationExecutor(_aggregationFunctions);
} else {
aggregationExecutor = new DefaultAggregationExecutor(_aggregationFunctions);
aggregationExecutor = new DefaultAggregationExecutor(_aggregationFunctions, _preAggregatedResults);
}
ValueBlock valueBlock;
while ((valueBlock = _projectOperator.nextBlock()) != null) {
Expand Down
Loading