public class IntroduceTwoStepAggregateRule
The rule searches for aggregate operators with an aggregate function
expression that has not been initialized for two step aggregation.
AGGREGATE( $v : af1( $v1 ) )
Where af1 is a VXquery aggregate function expression configured for single
step processing and $v1 is defined in plan__child.
if (af1 == count) aggregate operating settings:
Step 1: count
Step 2: sum
if (af1 == avg) aggregate operating settings:
Step 1: avg-local
Step 2: avg-global
if (af1 in (max, min, sum)) aggregate operating settings:
Step 1: af1
Step 2: af1