Search in sources :

Example 1 with UnaliasSymbolReferences

use of io.trino.sql.planner.optimizations.UnaliasSymbolReferences 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)1 IterativeOptimizer (io.trino.sql.planner.iterative.IterativeOptimizer)1 RemoveRedundantIdentityProjections (io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections)1 PlanOptimizer (io.trino.sql.planner.optimizations.PlanOptimizer)1 UnaliasSymbolReferences (io.trino.sql.planner.optimizations.UnaliasSymbolReferences)1