}
}
// Construct the appropriate aggregation service
boolean hasGroupBy = !groupByNodes.isEmpty();
AggregationService aggregationService = AggregationServiceFactory.getService(selectAggregateExprNodes, havingAggregateExprNodes, orderByAggregateExprNodes, hasGroupBy, stmtContext.getMethodResolutionService(), stmtContext, statementSpecCompiled.getAnnotations(), stmtContext.getVariableService(), stmtContext.getStatementStopService(), typeService.getEventTypes().length > 1,
statementSpecCompiled.getFilterRootNode(), statementSpecCompiled.getHavingExprRootNode());
boolean useCollatorSort = false;
if (stmtContext.getConfigSnapshot() != null)
{