pub struct DistributedPhysicalOptimizerRule;Expand description
Physical optimizer rule that inspects the plan, places the appropriate network boundaries, and breaks it down into stages that can be executed in a distributed manner.
The rule has three steps:
-
Annotate the plan with [annotate_plan]: adds some annotations to each node about how many distributed tasks should be used in the stage containing them, and whether they need a network boundary below or not. For more information about this step, read [annotate_plan] docs.
-
Based on the [AnnotatedPlan] returned by [annotate_plan], place all the appropriate network boundaries (NetworkShuffleExec and NetworkCoalesceExec) with the task count assignation that the annotations required. After this, the plan is already a distributed executable plan.
-
Place the [CoalesceBatchesExec] in the appropriate places (just below network boundaries), so that we send fewer and bigger record batches over the wire instead of a lot of small ones.
Trait Implementations§
Source§impl Default for DistributedPhysicalOptimizerRule
impl Default for DistributedPhysicalOptimizerRule
Source§fn default() -> DistributedPhysicalOptimizerRule
fn default() -> DistributedPhysicalOptimizerRule
Source§impl PhysicalOptimizerRule for DistributedPhysicalOptimizerRule
impl PhysicalOptimizerRule for DistributedPhysicalOptimizerRule
Source§fn optimize(
&self,
original: Arc<dyn ExecutionPlan>,
cfg: &ConfigOptions,
) -> Result<Arc<dyn ExecutionPlan>>
fn optimize( &self, original: Arc<dyn ExecutionPlan>, cfg: &ConfigOptions, ) -> Result<Arc<dyn ExecutionPlan>>
plan to an optimized formSource§fn schema_check(&self) -> bool
fn schema_check(&self) -> bool
Auto Trait Implementations§
impl Freeze for DistributedPhysicalOptimizerRule
impl RefUnwindSafe for DistributedPhysicalOptimizerRule
impl Send for DistributedPhysicalOptimizerRule
impl Sync for DistributedPhysicalOptimizerRule
impl Unpin for DistributedPhysicalOptimizerRule
impl UnsafeUnpin for DistributedPhysicalOptimizerRule
impl UnwindSafe for DistributedPhysicalOptimizerRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request