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; }
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; }
public void processPage(Page page) { if (step.isInputRaw()) { aggregation.addInput(page); } else { aggregation.addIntermediate(page.getBlock(intermediateChannel)); } }
public static Step partialOutput(Step step) { if (step.isInputRaw()) { return Step.PARTIAL; } else { return Step.INTERMEDIATE; } }
public void processPage(GroupByIdBlock groupIds, Page page) { if (step.isInputRaw()) { aggregation.addInput(groupIds, page); } else { aggregation.addIntermediate(groupIds, page.getBlock(intermediateChannel)); } }
public void processPage(GroupByIdBlock groupIds, Page page) { if (step.isInputRaw()) { aggregation.addInput(groupIds, page); } else { aggregation.addIntermediate(groupIds, page.getBlock(intermediateChannel)); } }
public static Step partialOutput(Step step) { if (step.isInputRaw()) { return Step.PARTIAL; } else { return Step.INTERMEDIATE; } }
public void processPage(Page page) { if (step.isInputRaw()) { aggregation.addInput(page); } else { aggregation.addIntermediate(page.getBlock(intermediateChannel)); } }