Search in sources :

Example 1 with DetermineTableScanNodePartitioning

use of io.trino.sql.planner.iterative.rule.DetermineTableScanNodePartitioning in project trino by trinodb.

the class TestEliminateSorts method assertUnitPlan.

private void assertUnitPlan(@Language("SQL") String sql, PlanMatchPattern pattern) {
    TypeAnalyzer typeAnalyzer = createTestingTypeAnalyzer(getQueryRunner().getPlannerContext());
    List<PlanOptimizer> optimizers = ImmutableList.of(new IterativeOptimizer(getQueryRunner().getPlannerContext(), new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections(), new DetermineTableScanNodePartitioning(getQueryRunner().getMetadata(), getQueryRunner().getNodePartitioningManager(), new TaskCountEstimator(() -> 10)))), new AddExchanges(getQueryRunner().getPlannerContext(), typeAnalyzer, getQueryRunner().getStatsCalculator()));
    assertPlan(sql, pattern, optimizers);
}
Also used : TaskCountEstimator(io.trino.cost.TaskCountEstimator) RuleStatsRecorder(io.trino.sql.planner.RuleStatsRecorder) RemoveRedundantIdentityProjections(io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections) IterativeOptimizer(io.trino.sql.planner.iterative.IterativeOptimizer) DetermineTableScanNodePartitioning(io.trino.sql.planner.iterative.rule.DetermineTableScanNodePartitioning) TypeAnalyzer.createTestingTypeAnalyzer(io.trino.sql.planner.TypeAnalyzer.createTestingTypeAnalyzer) TypeAnalyzer(io.trino.sql.planner.TypeAnalyzer)

Aggregations

TaskCountEstimator (io.trino.cost.TaskCountEstimator)1 RuleStatsRecorder (io.trino.sql.planner.RuleStatsRecorder)1 TypeAnalyzer (io.trino.sql.planner.TypeAnalyzer)1 TypeAnalyzer.createTestingTypeAnalyzer (io.trino.sql.planner.TypeAnalyzer.createTestingTypeAnalyzer)1 IterativeOptimizer (io.trino.sql.planner.iterative.IterativeOptimizer)1 DetermineTableScanNodePartitioning (io.trino.sql.planner.iterative.rule.DetermineTableScanNodePartitioning)1 RemoveRedundantIdentityProjections (io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections)1