Expand description
LimitPushdown pushes LIMIT down through ExecutionPlans to reduce
data transfer as much as possible.
Structs§
- Global
Requirements - This is a “data class” we use within the
LimitPushdownrule to push downLimitExecin 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. - Limit
Pushdown - This rule inspects
ExecutionPlan’s and pushes down the fetch limit from the parent to the child if applicable.
Enums§
- Limit
Exec - This enumeration makes
skipandfetchcalculations easier by providing a single API for both local and global limit operators.
Functions§
- add_
global_ 🔒limit - Adds a global limit to the plan.
- add_
limit 🔒 - Adds a limit to the plan, chooses between global and local limits based on skip value and the number of partitions.
- combines_
input_ 🔒partitions - Checks if the given plan combines input partitions.
- extract_
limit 🔒 - Transforms the
ExecutionPlaninto aLimitExecif it is aGlobalLimitExecor aLocalLimitExec. - pushdown_
limit_ helper - This function is the main helper function of the
LimitPushDownrule. The helper takes anExecutionPlanand a global (algorithm) state which is an instance ofGlobalRequirementsand modifies these parameters while checking if the limits can be pushed down or not. - pushdown_
limits 🔒 - Pushes down the limit through the plan.