use of io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections in project hetu-core by openlookeng.
the class TestEliminateSorts method assertUnitPlan.
private void assertUnitPlan(@Language("SQL") String sql, PlanMatchPattern pattern) {
List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new AddExchanges(getQueryRunner().getMetadata(), new TypeAnalyzer(new SqlParser(), getQueryRunner().getMetadata()), true), new PruneUnreferencedOutputs(), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections())));
assertPlan(sql, pattern, optimizers);
}
use of io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections in project hetu-core by openlookeng.
the class TestOptimizeMixedDistinctAggregations method assertUnitPlan.
private void assertUnitPlan(String sql, PlanMatchPattern pattern) {
List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections(), new SingleDistinctAggregationToGroupBy(), new MultipleDistinctAggregationToMarkDistinct())), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), new TranslateExpressions(getQueryRunner().getMetadata(), getQueryRunner().getSqlParser()).rules(getMetadata())), new OptimizeMixedDistinctAggregations(getQueryRunner().getMetadata()), new PruneUnreferencedOutputs());
assertPlan(sql, pattern, optimizers);
}
use of io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections in project hetu-core by openlookeng.
the class TestSetFlatteningOptimizer method assertPlan.
@Override
protected void assertPlan(String sql, PlanMatchPattern pattern) {
List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new PruneUnreferencedOutputs(), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections())), new SetFlatteningOptimizer());
assertPlan(sql, pattern, optimizers);
}
use of io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections in project hetu-core by openlookeng.
the class BasePlanTest method assertMinimallyOptimizedPlan.
protected void assertMinimallyOptimizedPlan(@Language("SQL") String sql, PlanMatchPattern pattern) {
List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(queryRunner.getMetadata()), new PruneUnreferencedOutputs(), new IterativeOptimizer(new RuleStatsRecorder(), queryRunner.getStatsCalculator(), queryRunner.getCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections())));
assertPlan(sql, LogicalPlanner.Stage.OPTIMIZED, pattern, optimizers);
}
use of io.prestosql.sql.planner.iterative.rule.RemoveRedundantIdentityProjections in project hetu-core by openlookeng.
the class TestMergeWindows method assertUnitPlan.
private void assertUnitPlan(@Language("SQL") String sql, PlanMatchPattern pattern) {
List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getCostCalculator(), new TranslateExpressions(getMetadata(), getQueryRunner().getSqlParser()).rules(getMetadata())), new IterativeOptimizer(new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), ImmutableSet.<Rule<?>>builder().add(new RemoveRedundantIdentityProjections()).addAll(GatherAndMergeWindows.rules()).build()), new PruneUnreferencedOutputs());
assertPlan(sql, pattern, optimizers);
}
Aggregations