CombineSortAndLimit implements Rewrite, Rule
Read onlyYes
FinalYes
A shared Sort stays for its other consumers.
Interfaces
Methods
- apply() : LogicalPlan
- Rewrite the plan, or return it unchanged. A rule never mutates the plan it is given.
- of() : Node
- The replacement for $original, given as $rebuilt over its rewritten children; $rebuilt itself when nothing changes.
Methods
apply()
Rewrite the plan, or return it unchanged. A rule never mutates the plan it is given.
public
apply(LogicalPlan $plan, Backend $backend) : LogicalPlan
A rule that rewrites nodes goes through LogicalPlan::transformUp(): its one memo rewrites a node every consumer shares exactly once, so the Result and the writes keep sharing it.
Parameters
- $plan : LogicalPlan
- $backend : Backend
Return values
LogicalPlanof()
The replacement for $original, given as $rebuilt over its rewritten children; $rebuilt itself when nothing changes.
public
of(Node $original, Node $rebuilt) : Node
Apply it to a plan through LogicalPlan::transformUp(): its memo rewrites a node every consumer shares exactly once, so the shared prefix stays shared. It never reaches into a join's right side.