pub trait ExecutionPlanProperties {
    // Required methods
    fn output_partitioning(&self) -> &Partitioning;
    fn execution_mode(&self) -> ExecutionMode;
    fn output_ordering(&self) -> Option<&[PhysicalSortExpr]>;
    fn equivalence_properties(&self) -> &EquivalenceProperties;
}
Expand description

Extension trait provides an easy API to fetch various properties of ExecutionPlan objects based on ExecutionPlan::properties.

Required Methods§

source

fn output_partitioning(&self) -> &Partitioning

Specifies how the output of this ExecutionPlan is split into partitions.

source

fn execution_mode(&self) -> ExecutionMode

Specifies whether this plan generates an infinite stream of records. If the plan does not support pipelining, but its input(s) are infinite, returns ExecutionMode::PipelineBreaking to indicate this.

source

fn output_ordering(&self) -> Option<&[PhysicalSortExpr]>

If the output of this ExecutionPlan within each partition is sorted, returns Some(keys) describing the ordering. A None return value indicates no assumptions should be made on the output ordering.

For example, SortExec (obviously) produces sorted output as does SortPreservingMergeStream. Less obviously, Projection produces sorted output if its input is sorted as it does not reorder the input rows.

source

fn equivalence_properties(&self) -> &EquivalenceProperties

Get the EquivalenceProperties within the plan.

Equivalence properties tell DataFusion what columns are known to be equal, during various optimization passes. By default, this returns “no known equivalences” which is always correct, but may cause DataFusion to unnecessarily resort data.

If this ExecutionPlan makes no changes to the schema of the rows flowing through it or how columns within each row relate to each other, it should return the equivalence properties of its input. For example, since FilterExec may remove rows from its input, but does not otherwise modify them, it preserves its input equivalence properties. However, since ProjectionExec may calculate derived expressions, it needs special handling.

See also ExecutionPlan::maintains_input_order and Self::output_ordering for related concepts.

Implementations on Foreign Types§

source§

impl ExecutionPlanProperties for Arc<dyn ExecutionPlan>

Implementors§