Class AggregateMergeRule

All Implemented Interfaces:

@Enclosing public class AggregateMergeRule extends RelRule<AggregateMergeRule.Config> implements TransformationRule
Planner rule that matches an Aggregate on a Aggregate and the top aggregate's group key is a subset of the lower aggregate's group key, and the aggregates are expansions of rollups, then it would convert into a single aggregate.

For example, SUM of SUM becomes SUM; SUM of COUNT becomes COUNT; MAX of MAX becomes MAX; MIN of MIN becomes MIN. AVG of AVG would not match, nor would COUNT of COUNT.

See Also: