public void initAggregator(ExpressionExecutor[] attributeExpressionExecutors, ProcessingMode processingMode,
                               boolean outputExpectsExpiredEvents,
                               ConfigReader configReader, boolean groupBy, SiddhiQueryContext siddhiQueryContext) {
        try {
            this.attributeExpressionExecutors = attributeExpressionExecutors;
            this.attributeSize = attributeExpressionExecutors.length;
            InputParameterValidator.validateExpressionExecutors(this, attributeExpressionExecutors);
            StateFactory<S> stateFactory = init(attributeExpressionExecutors, processingMode,
                    outputExpectsExpiredEvents, configReader, siddhiQueryContext);
            stateHolder = siddhiQueryContext.generateStateHolder(this.getClass().getName(),
                    groupBy, stateFactory, true);
        } catch (Throwable t) {
            throw new SiddhiAppCreationException(t);
        }
    }
Abstract parent class for attribute aggregators. Attribute aggregators are used to perform aggregate operations
such as count, average, etc.

@param <S> current state for the Attribute Executor
modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/attribute/aggregator/AttributeAggregatorExecutor.java