Class ValuesReduceRule

All Implemented Interfaces:
TransformationRule

@Enclosing public class ValuesReduceRule extends RelRule<ValuesReduceRule.Config> implements TransformationRule
Planner rule that folds projections and filters into an underlying LogicalValues.

Returns a simplified Values, perhaps containing zero tuples if all rows are filtered away.

For example,

select a - b from (values (1, 2), (3, 5), (7, 11)) as t (a, b) where a + b > 4

becomes

select x from (values (-2), (-4))

Ignores an empty Values; this is better dealt with by PruneEmptyRules.

See Also: