struct OptimizationInvariantChecker<'a> {
rule: &'a Arc<dyn PhysicalOptimizerRule + Send + Sync>,
}Fields§
§rule: &'a Arc<dyn PhysicalOptimizerRule + Send + Sync>Implementations§
Source§impl<'a> OptimizationInvariantChecker<'a>
impl<'a> OptimizationInvariantChecker<'a>
Sourcepub fn new(rule: &'a Arc<dyn PhysicalOptimizerRule + Send + Sync>) -> Self
pub fn new(rule: &'a Arc<dyn PhysicalOptimizerRule + Send + Sync>) -> Self
Create an OptimizationInvariantChecker that performs checking per tule.
Sourcepub fn check(
&mut self,
plan: &Arc<dyn ExecutionPlan>,
previous_schema: Arc<Schema>,
) -> Result<()>
pub fn check( &mut self, plan: &Arc<dyn ExecutionPlan>, previous_schema: Arc<Schema>, ) -> Result<()>
Checks that the plan change is permitted, returning an Error if not.
Conditionally performs schema checks per PhysicalOptimizerRule::schema_check.
In debug mode, this recursively walks the entire physical plan
and performs ExecutionPlan::check_invariants.
Trait Implementations§
Source§impl<'n> TreeNodeVisitor<'n> for OptimizationInvariantChecker<'_>
impl<'n> TreeNodeVisitor<'n> for OptimizationInvariantChecker<'_>
Source§type Node = Arc<dyn ExecutionPlan>
type Node = Arc<dyn ExecutionPlan>
The node type which is visitable.
Source§fn f_down(&mut self, node: &'n Self::Node) -> Result<TreeNodeRecursion>
fn f_down(&mut self, node: &'n Self::Node) -> Result<TreeNodeRecursion>
Invoked while traversing down the tree, before any children are visited.
Default implementation continues the recursion.
Source§fn f_up(
&mut self,
_node: &'n Self::Node,
) -> Result<TreeNodeRecursion, DataFusionError>
fn f_up( &mut self, _node: &'n Self::Node, ) -> Result<TreeNodeRecursion, DataFusionError>
Invoked while traversing up the tree after children are visited. Default
implementation continues the recursion.
Auto Trait Implementations§
impl<'a> Freeze for OptimizationInvariantChecker<'a>
impl<'a> !RefUnwindSafe for OptimizationInvariantChecker<'a>
impl<'a> Send for OptimizationInvariantChecker<'a>
impl<'a> Sync for OptimizationInvariantChecker<'a>
impl<'a> Unpin for OptimizationInvariantChecker<'a>
impl<'a> !UnwindSafe for OptimizationInvariantChecker<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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 more