Class PruneConstantSortKeysFromOrderBy


public final class PruneConstantSortKeysFromOrderBy extends ParameterizedRule<LogicalPlan,LogicalPlan,LogicalOptimizerContext>
Removes sort keys that are provably constant — foldable, or a field missing from every shard — since sorting by a constant conveys no order. Emptying the sort lets the surrounding Limit/LimitBy stay a plain limit instead of becoming a TopN, which is what lets it push down to Lucene.