use of com.facebook.presto.operator.repartition.OptimizedPartitionedOutputOperator.OptimizedPartitionedOutputFactory in project presto by prestodb.
the class TestOptimizedPartitionedOutputOperator method createOptimizedPartitionedOutputOperator.
private OptimizedPartitionedOutputOperator createOptimizedPartitionedOutputOperator(List<Type> types, List<Integer> partitionChannel, PartitionFunction partitionFunction, PartitionedOutputBuffer buffer, OptionalInt nullChannel, DataSize maxMemory) {
PagesSerdeFactory serdeFactory = new PagesSerdeFactory(new BlockEncodingManager(), false);
OutputPartitioning outputPartitioning = new OutputPartitioning(partitionFunction, partitionChannel, ImmutableList.of(Optional.empty()), false, nullChannel);
OptimizedPartitionedOutputFactory operatorFactory = new OptimizedPartitionedOutputFactory(buffer, maxMemory);
return (OptimizedPartitionedOutputOperator) operatorFactory.createOutputOperator(0, new PlanNodeId("plan-node-0"), types, Function.identity(), Optional.of(outputPartitioning), serdeFactory).createOperator(createDriverContext());
}
Aggregations