Class AggregateFilterToCaseRule

All Implemented Interfaces:
TransformationRule

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

For example,

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

becomes

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