slot = currentSlot++;
AggregationStateFactory providerFactory = aggregateNode.getFactory().getAggregationStateFactory(false);
stateFactories.add(providerFactory);
}
accessorPairs.add(new AggregationAccessorSlotPair(slot, accessor));
}
// handle no group-by clause cases
AggregationAccessorSlotPair[] pairs = accessorPairs.toArray(new AggregationAccessorSlotPair[accessorPairs.size()]);
AggregationStateFactory[] accessAggregations = stateFactories.toArray(new AggregationStateFactory[stateFactories.size()]);