use of io.trino.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy in project trino by trinodb.
the class TestOptimizeMixedDistinctAggregations method assertUnitPlan.
private void assertUnitPlan(String sql, PlanMatchPattern pattern) {
List<PlanOptimizer> optimizers = ImmutableList.of(new UnaliasSymbolReferences(getQueryRunner().getMetadata()), new IterativeOptimizer(getQueryRunner().getPlannerContext(), new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), ImmutableSet.of(new RemoveRedundantIdentityProjections(), new SingleDistinctAggregationToGroupBy(), new MultipleDistinctAggregationToMarkDistinct())), new OptimizeMixedDistinctAggregations(getQueryRunner().getMetadata()), new IterativeOptimizer(getQueryRunner().getPlannerContext(), new RuleStatsRecorder(), getQueryRunner().getStatsCalculator(), getQueryRunner().getEstimatedExchangesCostCalculator(), ImmutableSet.<Rule<?>>builder().add(new RemoveRedundantIdentityProjections()).addAll(columnPruningRules(getQueryRunner().getMetadata())).build()));
assertPlan(sql, pattern, optimizers);
}
Aggregations