pub struct EnforceDistribution {}
Expand description
The EnforceDistribution rule ensures that distribution requirements are met in the strictest way. It might add additional RepartitionExec to the plan tree and give a non-optimal plan, but it can avoid the possible data skew in joins.
For example for a HashJoin with keys(a, b, c), the required Distribution(a, b, c) can be satisfied by several alternative partitioning ways: [(a, b, c), (a, b), (a, c), (b, c), (a), (b), (c), ( )].
This rule only chooses the exactly match and satisfies the Distribution(a, b, c) by a HashPartition(a, b, c).
Implementations§
Trait Implementations§
source§impl Default for EnforceDistribution
impl Default for EnforceDistribution
source§fn default() -> EnforceDistribution
fn default() -> EnforceDistribution
Returns the “default value” for a type. Read more
source§impl PhysicalOptimizerRule for EnforceDistribution
impl PhysicalOptimizerRule for EnforceDistribution
source§fn optimize(
&self,
plan: Arc<dyn ExecutionPlan>,
config: &ConfigOptions
) -> Result<Arc<dyn ExecutionPlan>>
fn optimize( &self, plan: Arc<dyn ExecutionPlan>, config: &ConfigOptions ) -> Result<Arc<dyn ExecutionPlan>>
Rewrite
plan
to an optimized formsource§fn schema_check(&self) -> bool
fn schema_check(&self) -> bool
A flag to indicate whether the physical planner should valid the rule will not
change the schema of the plan after the rewriting.
Some of the optimization rules might change the nullable properties of the schema
and should disable the schema check.
Auto Trait Implementations§
impl RefUnwindSafe for EnforceDistribution
impl Send for EnforceDistribution
impl Sync for EnforceDistribution
impl Unpin for EnforceDistribution
impl UnwindSafe for EnforceDistribution
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
Mutably borrows from an owned value. Read more