Class ProjectAggregateMergeRule

All Implemented Interfaces:

@Enclosing public class ProjectAggregateMergeRule extends RelRule<ProjectAggregateMergeRule.Config> implements TransformationRule
Planner rule that matches a Project on a Aggregate and projects away aggregate calls that are not used.

Also converts COALESCE(SUM(x), 0) to SUM0(x). This transformation is useful because there are cases where AggregateMergeRule can merge SUM0 but not SUM.

See Also: