}
}
// Construct the appropriate aggregation service
boolean hasGroupBy = !groupByNodes.isEmpty();
AggregationServiceFactoryDesc aggregationServiceFactory = AggregationServiceFactoryFactory.getService(selectAggregateExprNodes, havingAggregateExprNodes, orderByAggregateExprNodes, hasGroupBy, evaluatorContextStmt, statementSpec.getAnnotations(), stmtContext.getVariableService(), typeService.getEventTypes().length > 1,
statementSpec.getFilterRootNode(), statementSpec.getHavingExprRootNode(),
stmtContext.getAggregationServiceFactoryService(), typeService.getEventTypes());
boolean useCollatorSort = false;
if (stmtContext.getConfigSnapshot() != null)