Class AggregateJoinRemoveRule

All Implemented Interfaces:
TransformationRule

@Enclosing public class AggregateJoinRemoveRule extends RelRule<AggregateJoinRemoveRule.Config> implements TransformationRule
Planner rule that matches an Aggregate on a Join and removes the join provided that the join is a left join or right join and it computes no aggregate functions or all the aggregate calls have distinct.

For instance,

select distinct s.product_id from
 sales as s
 left join product as p
 on s.product_id = p.product_id

becomes

select distinct s.product_id from sales as s
See Also: