struct Rewriter<'a> {
apply_order: ApplyOrder,
rule: &'a dyn OptimizerRule,
config: &'a dyn OptimizerConfig,
}Expand description
Recursively rewrites LogicalPlans
Fields§
§apply_order: ApplyOrder§rule: &'a dyn OptimizerRule§config: &'a dyn OptimizerConfigImplementations§
Source§impl<'a> Rewriter<'a>
impl<'a> Rewriter<'a>
fn new( apply_order: ApplyOrder, rule: &'a dyn OptimizerRule, config: &'a dyn OptimizerConfig, ) -> Self
Trait Implementations§
Source§impl TreeNodeRewriter for Rewriter<'_>
impl TreeNodeRewriter for Rewriter<'_>
Source§type Node = LogicalPlan
type Node = LogicalPlan
The node type which is rewritable.
Source§fn f_down(&mut self, node: LogicalPlan) -> Result<Transformed<LogicalPlan>>
fn f_down(&mut self, node: LogicalPlan) -> Result<Transformed<LogicalPlan>>
Invoked while traversing down the tree before any children are rewritten.
Default implementation returns the node as is and continues recursion.
Source§fn f_up(&mut self, node: LogicalPlan) -> Result<Transformed<LogicalPlan>>
fn f_up(&mut self, node: LogicalPlan) -> Result<Transformed<LogicalPlan>>
Invoked while traversing up the tree after all children have been rewritten.
Default implementation returns the node as is and continues recursion.
Auto Trait Implementations§
impl<'a> Freeze for Rewriter<'a>
impl<'a> !RefUnwindSafe for Rewriter<'a>
impl<'a> !Send for Rewriter<'a>
impl<'a> !Sync for Rewriter<'a>
impl<'a> Unpin for Rewriter<'a>
impl<'a> !UnwindSafe for Rewriter<'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