Search in sources :

Example 6 with IterativeOptimizer

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

the class BasePlanTest method assertMinimallyOptimizedPlan.

protected void assertMinimallyOptimizedPlan(@Language("SQL") String sql, PlanMatchPattern pattern) {
    List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new IterativeOptimizer(queryRunner.getPlannerContext(), new RuleStatsRecorder(), queryRunner.getStatsCalculator(), queryRunner.getCostCalculator(), ImmutableSet.<Rule<?>>builder().add(new RemoveRedundantIdentityProjections()).addAll(columnPruningRules(getQueryRunner().getMetadata())).build()));
    assertPlan(sql, OPTIMIZED, pattern, optimizers);
}
Also used : PlanOptimizer(io.trino.sql.planner.optimizations.PlanOptimizer) RuleStatsRecorder(io.trino.sql.planner.RuleStatsRecorder) RemoveRedundantIdentityProjections(io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections) IterativeOptimizer(io.trino.sql.planner.iterative.IterativeOptimizer) UnaliasSymbolReferences(io.trino.sql.planner.optimizations.UnaliasSymbolReferences)

Aggregations

RuleStatsRecorder (io.trino.sql.planner.RuleStatsRecorder)6 IterativeOptimizer (io.trino.sql.planner.iterative.IterativeOptimizer)6 RemoveRedundantIdentityProjections (io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections)6 Rule (io.trino.sql.planner.iterative.Rule)2 TaskCountEstimator (io.trino.cost.TaskCountEstimator)1 TypeAnalyzer (io.trino.sql.planner.TypeAnalyzer)1 TypeAnalyzer.createTestingTypeAnalyzer (io.trino.sql.planner.TypeAnalyzer.createTestingTypeAnalyzer)1 DetermineTableScanNodePartitioning (io.trino.sql.planner.iterative.rule.DetermineTableScanNodePartitioning)1 GatherAndMergeWindows (io.trino.sql.planner.iterative.rule.GatherAndMergeWindows)1 MergeExcept (io.trino.sql.planner.iterative.rule.MergeExcept)1 MergeIntersect (io.trino.sql.planner.iterative.rule.MergeIntersect)1 MergeUnion (io.trino.sql.planner.iterative.rule.MergeUnion)1 MultipleDistinctAggregationToMarkDistinct (io.trino.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct)1 PruneDistinctAggregation (io.trino.sql.planner.iterative.rule.PruneDistinctAggregation)1 SingleDistinctAggregationToGroupBy (io.trino.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy)1 PlanOptimizer (io.trino.sql.planner.optimizations.PlanOptimizer)1 UnaliasSymbolReferences (io.trino.sql.planner.optimizations.UnaliasSymbolReferences)1