Search in sources :

Example 6 with RemoveRedundantIdentityProjections

use of com.facebook.presto.sql.planner.iterative.rule.RemoveRedundantIdentityProjections in project presto by prestodb.

the class TestEliminateSorts method assertUnitPlan.

public void assertUnitPlan(@Language("SQL") String sql, PlanMatchPattern pattern) {
    List<PlanOptimizer> optimizers = ImmutableList.of(new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), new TranslateExpressions(getMetadata(), new SqlParser()).rules()), new AddExchanges(getQueryRunner().getMetadata(), new SqlParser(), new PartitioningProviderManager()), new UnaliasSymbolReferences(getMetadata().getFunctionAndTypeManager()), new PruneUnreferencedOutputs(), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections())));
    assertPlan(sql, pattern, optimizers);
}
Also used : RuleStatsRecorder(com.facebook.presto.sql.planner.RuleStatsRecorder) RemoveRedundantIdentityProjections(com.facebook.presto.sql.planner.iterative.rule.RemoveRedundantIdentityProjections) PartitioningProviderManager(com.facebook.presto.sql.planner.PartitioningProviderManager) IterativeOptimizer(com.facebook.presto.sql.planner.iterative.IterativeOptimizer) SqlParser(com.facebook.presto.sql.parser.SqlParser) TranslateExpressions(com.facebook.presto.sql.planner.iterative.rule.TranslateExpressions)

Aggregations

RuleStatsRecorder (com.facebook.presto.sql.planner.RuleStatsRecorder)6 IterativeOptimizer (com.facebook.presto.sql.planner.iterative.IterativeOptimizer)6 RemoveRedundantIdentityProjections (com.facebook.presto.sql.planner.iterative.rule.RemoveRedundantIdentityProjections)6 TranslateExpressions (com.facebook.presto.sql.planner.iterative.rule.TranslateExpressions)4 SqlParser (com.facebook.presto.sql.parser.SqlParser)3 PartitioningProviderManager (com.facebook.presto.sql.planner.PartitioningProviderManager)1 GatherAndMergeWindows (com.facebook.presto.sql.planner.iterative.rule.GatherAndMergeWindows)1 MultipleDistinctAggregationToMarkDistinct (com.facebook.presto.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct)1 SingleDistinctAggregationToGroupBy (com.facebook.presto.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy)1 PlanOptimizer (com.facebook.presto.sql.planner.optimizations.PlanOptimizer)1 PruneUnreferencedOutputs (com.facebook.presto.sql.planner.optimizations.PruneUnreferencedOutputs)1 UnaliasSymbolReferences (com.facebook.presto.sql.planner.optimizations.UnaliasSymbolReferences)1