pub trait ToDistributedBatch {
// Required method
fn to_distributed(&self) -> Result<BatchPlanRef>;
// Provided method
fn to_distributed_with_required(
&self,
required_order: &Order,
required_dist: &RequiredDist,
) -> Result<BatchPlanRef> { ... }
}Expand description
ToDistributedBatch allows to convert a batch physical plan to distributed batch plan, by
insert exchange node, with an optional required order and distributed.
To implement this trait you can choose one of the two ways:
- Implement
to_distributedand use the default implementation ofto_distributed_with_required - Or, if a better plan can be generated when a required order is given, you can implement
to_distributed_with_required, and implementto_distributedwithto_distributed_with_required(&Order::any(), &RequiredDist::Any)
Required Methods§
Sourcefn to_distributed(&self) -> Result<BatchPlanRef>
fn to_distributed(&self) -> Result<BatchPlanRef>
to_distributed is equivalent to to_distributed_with_required(&Order::any(), &RequiredDist::Any)
Provided Methods§
Sourcefn to_distributed_with_required(
&self,
required_order: &Order,
required_dist: &RequiredDist,
) -> Result<BatchPlanRef>
fn to_distributed_with_required( &self, required_order: &Order, required_dist: &RequiredDist, ) -> Result<BatchPlanRef>
insert the exchange in batch physical plan to satisfy the required Distribution and Order.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".