if (step.isOutputPartial()) { accumulators.get(j).evaluateIntermediate(output.getBlockBuilder(channel));
if (step.isOutputPartial()) { accumulators.get(j).evaluateIntermediate(output.getBlockBuilder(channel));
private PhysicalOperation planGlobalAggregation(AggregationNode node, PhysicalOperation source, LocalExecutionPlanContext context) { ImmutableMap.Builder<Symbol, Integer> outputMappings = ImmutableMap.builder(); AggregationOperatorFactory operatorFactory = createAggregationOperatorFactory( node.getId(), node.getAggregations(), node.getStep(), 0, outputMappings, source, context, node.getStep().isOutputPartial()); return new PhysicalOperation(operatorFactory, outputMappings.build(), context, source); }
if (step.isOutputPartial() || !spillEnabled || hasOrderBy() || hasDistinct()) { aggregationBuilder = new InMemoryHashAggregationBuilder( accumulatorFactories,
if (step.isOutputPartial() || !spillEnabled || hasOrderBy() || hasDistinct()) { aggregationBuilder = new InMemoryHashAggregationBuilder( accumulatorFactories,
private void updateMemoryUsage() { long memorySize = pageBuilder.getRetainedSizeInBytes(); for (Page output : outputPages) { memorySize += output.getRetainedSizeInBytes(); } for (Aggregator aggregator : aggregates) { memorySize += aggregator.getEstimatedSize(); } if (currentGroup != null) { memorySize += currentGroup.getRetainedSizeInBytes(); } if (step.isOutputPartial()) { systemMemoryContext.setBytes(memorySize); } else { userMemoryContext.setBytes(memorySize); } }
private void updateMemoryUsage() { long memorySize = pageBuilder.getRetainedSizeInBytes(); for (Page output : outputPages) { memorySize += output.getRetainedSizeInBytes(); } for (Aggregator aggregator : aggregates) { memorySize += aggregator.getEstimatedSize(); } if (currentGroup != null) { memorySize += currentGroup.getRetainedSizeInBytes(); } if (step.isOutputPartial()) { systemMemoryContext.setBytes(memorySize); } else { userMemoryContext.setBytes(memorySize); } }
private PhysicalOperation planGlobalAggregation(AggregationNode node, PhysicalOperation source, LocalExecutionPlanContext context) { ImmutableMap.Builder<Symbol, Integer> outputMappings = ImmutableMap.builder(); AggregationOperatorFactory operatorFactory = createAggregationOperatorFactory( node.getId(), node.getAggregations(), node.getStep(), 0, outputMappings, source, context, node.getStep().isOutputPartial()); return new PhysicalOperation(operatorFactory, outputMappings.build(), context, source); }
public static Step partialInput(Step step) { if (step.isOutputPartial()) { return Step.INTERMEDIATE; } else { return Step.FINAL; } } }
public Type getType() { if (step.isOutputPartial()) { return aggregation.getIntermediateType(); } else { return aggregation.getFinalType(); } }
/** * @return whether this node should produce default output in case of no input pages. * For example for query: * <p> * SELECT count(*) FROM nation WHERE nationkey < 0 * <p> * A default output of "0" is expected to be produced by FINAL aggregation operator. */ public boolean hasDefaultOutput() { return hasEmptyGroupingSet() && (step.isOutputPartial() || step.equals(SINGLE)); }
public Type getType() { if (step.isOutputPartial()) { return aggregation.getIntermediateType(); } else { return aggregation.getFinalType(); } }
public static Step partialInput(Step step) { if (step.isOutputPartial()) { return Step.INTERMEDIATE; } else { return Step.FINAL; } } }
/** * @return whether this node should produce default output in case of no input pages. * For example for query: * <p> * SELECT count(*) FROM nation WHERE nationkey < 0 * <p> * A default output of "0" is expected to be produced by FINAL aggregation operator. */ public boolean hasDefaultOutput() { return hasEmptyGroupingSet() && (step.isOutputPartial() || step.equals(SINGLE)); }
public void evaluate(BlockBuilder blockBuilder) { if (step.isOutputPartial()) { aggregation.evaluateIntermediate(blockBuilder); } else { aggregation.evaluateFinal(blockBuilder); } }
public void evaluate(BlockBuilder blockBuilder) { if (step.isOutputPartial()) { aggregation.evaluateIntermediate(blockBuilder); } else { aggregation.evaluateFinal(blockBuilder); } }
public void evaluate(int groupId, BlockBuilder output) { if (step.isOutputPartial()) { aggregation.evaluateIntermediate(groupId, output); } else { aggregation.evaluateFinal(groupId, output); } }
public void evaluate(int groupId, BlockBuilder output) { if (step.isOutputPartial()) { aggregation.evaluateIntermediate(groupId, output); } else { aggregation.evaluateFinal(groupId, output); } }
public Type getType() { if (step.isOutputPartial()) { return aggregation.getIntermediateType(); } else { return aggregation.getFinalType(); } }
public Type getType() { if (step.isOutputPartial()) { return aggregation.getIntermediateType(); } else { return aggregation.getFinalType(); } }