Class ReplaceLimitByExpressionWithEval


public final class ReplaceLimitByExpressionWithEval extends OptimizerRules.OptimizerRule<LimitBy>
Extract non-attribute LimitBy grouping expressions into a synthetic Eval.

For example, LIMIT N BY languages * 2 becomes EVAL $$limit_by_0 = languages * 2 | LIMIT N BY $$limit_by_0. PushDownEval in the operators batch takes care of pushing the Eval below any OrderBy if present.

Foldable groupings are pruned separately by PruneLiteralsInLimitBy in the operators batch.