pub trait ExecutionPlanProperties {
// Required methods
fn output_partitioning(&self) -> &Partitioning;
fn output_ordering(&self) -> Option<&LexOrdering>;
fn boundedness(&self) -> Boundedness;
fn pipeline_behavior(&self) -> EmissionType;
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§
Sourcefn output_partitioning(&self) -> &Partitioning
fn output_partitioning(&self) -> &Partitioning
Specifies how the output of this ExecutionPlan
is split into
partitions.
Sourcefn output_ordering(&self) -> Option<&LexOrdering>
fn output_ordering(&self) -> Option<&LexOrdering>
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.
Sourcefn boundedness(&self) -> Boundedness
fn boundedness(&self) -> Boundedness
Boundedness information of the stream corresponding to this ExecutionPlan
.
For more details, see Boundedness
.
Sourcefn pipeline_behavior(&self) -> EmissionType
fn pipeline_behavior(&self) -> EmissionType
Indicates how the stream of this ExecutionPlan
emits its results.
For more details, see EmissionType
.
Sourcefn equivalence_properties(&self) -> &EquivalenceProperties
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.