Class AggregateCaseToFilterRule

All Implemented Interfaces:
TransformationRule

@Enclosing public class AggregateCaseToFilterRule extends RelRule<AggregateCaseToFilterRule.Config> implements TransformationRule
Rule that converts CASE-style filtered aggregates into true filtered aggregates.

For example,

SELECT SUM(CASE WHEN gender = 'F' THEN salary END)
FROM Emp

becomes

SELECT SUM(salary) FILTER (WHERE gender = 'F')
FROM Emp
See Also: