Module limit_pushdown

Source
Expand description

LimitPushdown pushes LIMIT down through ExecutionPlans to reduce data transfer as much as possible.

Structs§

GlobalRequirements
This is a “data class” we use within the LimitPushdown rule to push down LimitExec 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.
LimitPushdown
This rule inspects ExecutionPlan’s and pushes down the fetch limit from the parent to the child if applicable.

Enums§

LimitExec
This enumeration makes skip and fetch calculations easier by providing a single API for both local and global limit operators.

Functions§

pushdown_limit_helper
This function is the main helper function of the LimitPushDown rule. The helper takes an ExecutionPlan and a global (algorithm) state which is an instance of GlobalRequirements and modifies these parameters while checking if the limits can be pushed down or not.