Search in sources :

Example 1 with PruneDistinctAggregation

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

the class TestSetFlattening method assertPlan.

@Override
protected void assertPlan(String sql, PlanMatchPattern pattern) {
    List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new IterativeOptimizer(getQueryRunner().getPlannerContext(), new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), ImmutableSet.<Rule<?>>builder().add(new RemoveRedundantIdentityProjections()).add(new MergeUnion()).add(new MergeIntersect()).add(new MergeExcept()).add(new PruneDistinctAggregation()).addAll(columnPruningRules(getQueryRunner().getMetadata())).build()));
    assertPlan(sql, pattern, optimizers);
}
Also used : MergeExcept(io.trino.sql.planner.iterative.rule.MergeExcept) RuleStatsRecorder(io.trino.sql.planner.RuleStatsRecorder) RemoveRedundantIdentityProjections(io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections) PruneDistinctAggregation(io.trino.sql.planner.iterative.rule.PruneDistinctAggregation) IterativeOptimizer(io.trino.sql.planner.iterative.IterativeOptimizer) MergeIntersect(io.trino.sql.planner.iterative.rule.MergeIntersect) MergeUnion(io.trino.sql.planner.iterative.rule.MergeUnion)

Aggregations

RuleStatsRecorder (io.trino.sql.planner.RuleStatsRecorder)1 IterativeOptimizer (io.trino.sql.planner.iterative.IterativeOptimizer)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 PruneDistinctAggregation (io.trino.sql.planner.iterative.rule.PruneDistinctAggregation)1 RemoveRedundantIdentityProjections (io.trino.sql.planner.iterative.rule.RemoveRedundantIdentityProjections)1