Search in sources :

Example 1 with PlanFragmenter

use of io.trino.sql.planner.PlanFragmenter in project trino by trinodb.

the class TestCostCalculator method setUp.

@BeforeClass
public void setUp() {
    TaskCountEstimator taskCountEstimator = new TaskCountEstimator(() -> NUMBER_OF_NODES);
    costCalculatorUsingExchanges = new CostCalculatorUsingExchanges(taskCountEstimator);
    costCalculatorWithEstimatedExchanges = new CostCalculatorWithEstimatedExchanges(costCalculatorUsingExchanges, taskCountEstimator);
    session = testSessionBuilder().setCatalog("tpch").build();
    localQueryRunner = LocalQueryRunner.create(session);
    localQueryRunner.createCatalog("tpch", new TpchConnectorFactory(), ImmutableMap.of());
    planFragmenter = new PlanFragmenter(localQueryRunner.getMetadata(), localQueryRunner.getFunctionManager(), localQueryRunner.getNodePartitioningManager(), new QueryManagerConfig());
}
Also used : TpchConnectorFactory(io.trino.plugin.tpch.TpchConnectorFactory) PlanFragmenter(io.trino.sql.planner.PlanFragmenter) QueryManagerConfig(io.trino.execution.QueryManagerConfig) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

QueryManagerConfig (io.trino.execution.QueryManagerConfig)1 TpchConnectorFactory (io.trino.plugin.tpch.TpchConnectorFactory)1 PlanFragmenter (io.trino.sql.planner.PlanFragmenter)1 BeforeClass (org.testng.annotations.BeforeClass)1