Aggregator(AccumulatorFactory accumulatorFactory, AggregationNode.Step step) { if (step.isInputRaw()) { intermediateChannel = -1; aggregation = accumulatorFactory.createAccumulator(); } else { checkArgument(accumulatorFactory.getInputChannels().size() == 1, "expected 1 input channel for intermediate aggregation"); intermediateChannel = accumulatorFactory.getInputChannels().get(0); aggregation = accumulatorFactory.createIntermediateAccumulator(); } this.step = step; }
Aggregator(AccumulatorFactory accumulatorFactory, AggregationNode.Step step) { if (step.isInputRaw()) { intermediateChannel = -1; aggregation = accumulatorFactory.createAccumulator(); } else { checkArgument(accumulatorFactory.getInputChannels().size() == 1, "expected 1 input channel for intermediate aggregation"); intermediateChannel = accumulatorFactory.getInputChannels().get(0); aggregation = accumulatorFactory.createIntermediateAccumulator(); } this.step = step; }
private Aggregator(AccumulatorFactory accumulatorFactory, AggregationNode.Step step, Optional<Integer> overwriteIntermediateChannel) { if (step.isInputRaw()) { this.intermediateChannel = -1; this.aggregation = accumulatorFactory.createGroupedAccumulator(); } else if (overwriteIntermediateChannel.isPresent()) { this.intermediateChannel = overwriteIntermediateChannel.get(); this.aggregation = accumulatorFactory.createGroupedIntermediateAccumulator(); } else { checkArgument(accumulatorFactory.getInputChannels().size() == 1, "expected 1 input channel for intermediate aggregation"); this.intermediateChannel = accumulatorFactory.getInputChannels().get(0); this.aggregation = accumulatorFactory.createGroupedIntermediateAccumulator(); } this.step = step; }
private Aggregator(AccumulatorFactory accumulatorFactory, AggregationNode.Step step, Optional<Integer> overwriteIntermediateChannel) { if (step.isInputRaw()) { this.intermediateChannel = -1; this.aggregation = accumulatorFactory.createGroupedAccumulator(); } else if (overwriteIntermediateChannel.isPresent()) { this.intermediateChannel = overwriteIntermediateChannel.get(); this.aggregation = accumulatorFactory.createGroupedIntermediateAccumulator(); } else { checkArgument(accumulatorFactory.getInputChannels().size() == 1, "expected 1 input channel for intermediate aggregation"); this.intermediateChannel = accumulatorFactory.getInputChannels().get(0); this.aggregation = accumulatorFactory.createGroupedIntermediateAccumulator(); } this.step = step; }