datafusion_physical_optimizer

Module limit_pushdown

Source
Expand description

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

Structs§

  • 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.
  • This rule inspects ExecutionPlan’s and pushes down the fetch limit from the parent to the child if applicable.

Enums§

  • This enumeration makes skip and fetch 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 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.