Class PruneLiteralsInLimitBy


public final class PruneLiteralsInLimitBy extends OptimizerRules.OptimizerRule<LimitBy>
Prune foldable groupings from LIMIT BY. A foldable expression evaluates to the same constant for every row, so it has no grouping effect. If all groupings are foldable the LIMIT BY degenerates to a plain LIMIT. Groupings arrive from the parser as either raw Attributes or Alias nodes wrapping the expression. Expression.foldable() is always false, so we unwrap to check the child.