Trait datafusion::physical_plan::ExecutionPlan [−][src]
pub trait ExecutionPlan: Debug + Send + Sync { fn as_any(&self) -> &dyn Any; fn schema(&self) -> SchemaRef; fn output_partitioning(&self) -> Partitioning; fn children(&self) -> Vec<Arc<dyn ExecutionPlan>>; fn with_new_children(
&self,
children: Vec<Arc<dyn ExecutionPlan>>
) -> Result<Arc<dyn ExecutionPlan>>; fn execute<'life0, 'async_trait>(
&'life0 self,
partition: usize
) -> Pin<Box<dyn Future<Output = Result<SendableRecordBatchStream>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; fn required_child_distribution(&self) -> Distribution { ... } fn metrics(&self) -> HashMap<String, SQLMetric> { ... } fn fmt_as(&self, _t: DisplayFormatType, f: &mut Formatter<'_>) -> Result { ... } }
Expand description
ExecutionPlan
represent nodes in the DataFusion Physical Plan.
Each ExecutionPlan
is Partition-aware and is responsible for
creating the actual async
SendableRecordBatchStream
s
of RecordBatch
that incrementally compute the operator’s
output from its input partition.
ExecutionPlan
can be displayed in an simplified form using the
return value from displayable
in addition to the (normally
quite verbose) Debug
output.
Required methods
Returns the execution plan as Any
so that it can be
downcast to a specific implementation.
fn output_partitioning(&self) -> Partitioning
fn output_partitioning(&self) -> Partitioning
Specifies the output partitioning scheme of this plan
fn children(&self) -> Vec<Arc<dyn ExecutionPlan>>
fn children(&self) -> Vec<Arc<dyn ExecutionPlan>>
Get a list of child execution plans that provide the input for this plan. The returned list will be empty for leaf nodes, will contain a single value for unary nodes, or two values for binary nodes (such as joins).
fn with_new_children(
&self,
children: Vec<Arc<dyn ExecutionPlan>>
) -> Result<Arc<dyn ExecutionPlan>>
fn with_new_children(
&self,
children: Vec<Arc<dyn ExecutionPlan>>
) -> Result<Arc<dyn ExecutionPlan>>
Returns a new plan where all children were replaced by new plans.
The size of children
must be equal to the size of ExecutionPlan::children()
.
Provided methods
fn required_child_distribution(&self) -> Distribution
fn required_child_distribution(&self) -> Distribution
Specifies the data distribution requirements of all the children for this operator
Return a snapshot of the metrics collected during execution
fn fmt_as(&self, _t: DisplayFormatType, f: &mut Formatter<'_>) -> Result
fn fmt_as(&self, _t: DisplayFormatType, f: &mut Formatter<'_>) -> Result
Format this ExecutionPlan
to f
in the specified type.
Should not include a newline
Note this function prints a placeholder by default to preserve backwards compatibility.