Search in sources :

Example 1 with StreamingAggregationOperatorFactory

use of com.facebook.presto.operator.StreamingAggregationOperator.StreamingAggregationOperatorFactory in project presto by prestodb.

the class TestStreamingAggregationOperator method setUp.

@BeforeMethod
public void setUp() {
    executor = newCachedThreadPool(daemonThreadsNamed("test-executor-%s"));
    scheduledExecutor = newScheduledThreadPool(2, daemonThreadsNamed("test-scheduledExecutor-%s"));
    driverContext = createTaskContext(executor, scheduledExecutor, TEST_SESSION).addPipelineContext(0, true, true, false).addDriverContext();
    operatorFactory = new StreamingAggregationOperatorFactory(0, new PlanNodeId("test"), ImmutableList.of(BOOLEAN, VARCHAR, BIGINT), ImmutableList.of(VARCHAR), ImmutableList.of(1), AggregationNode.Step.SINGLE, ImmutableList.of(COUNT.bind(ImmutableList.of(0), Optional.empty()), LONG_SUM.bind(ImmutableList.of(2), Optional.empty())), new JoinCompiler(MetadataManager.createTestMetadataManager(), new FeaturesConfig()));
}
Also used : PlanNodeId(com.facebook.presto.spi.plan.PlanNodeId) JoinCompiler(com.facebook.presto.sql.gen.JoinCompiler) StreamingAggregationOperatorFactory(com.facebook.presto.operator.StreamingAggregationOperator.StreamingAggregationOperatorFactory) FeaturesConfig(com.facebook.presto.sql.analyzer.FeaturesConfig) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

StreamingAggregationOperatorFactory (com.facebook.presto.operator.StreamingAggregationOperator.StreamingAggregationOperatorFactory)1 PlanNodeId (com.facebook.presto.spi.plan.PlanNodeId)1 FeaturesConfig (com.facebook.presto.sql.analyzer.FeaturesConfig)1 JoinCompiler (com.facebook.presto.sql.gen.JoinCompiler)1 BeforeMethod (org.testng.annotations.BeforeMethod)1