Expand description
LimitPushdown
pushes LIMIT
down through ExecutionPlan
s to reduce
data transfer as much as possible.
Structs§
- This is a “data class” we use within the
LimitPushdown
rule to push downLimitExec
in the plan. GlobalRequirements are hold as a rule-wide state and holds the fetch and skip information. The struct also has a field named satisfied which means if the “current” plan is valid in terms of limits or not. - This rule inspects
ExecutionPlan
’s and pushes down the fetch limit from the parent to the child if applicable.
Enums§
- This enumeration makes
skip
andfetch
calculations easier by providing a single API for both local and global limit operators.
Functions§
- This function is the main helper function of the
LimitPushDown
rule. The helper takes anExecutionPlan
and a global (algorithm) state which is an instance ofGlobalRequirements
and modifies these parameters while checking if the limits can be pushed down or not.