Trait datafusion::logical_plan::ExprRewriter[][src]

pub trait ExprRewriter: Sized {
    fn mutate(&mut self, expr: Expr) -> Result<Expr>;

    fn pre_visit(&mut self, _expr: &Expr) -> Result<bool> { ... }
}

Trait for potentially recursively rewriting an Expr expression tree. When passed to Expr::rewrite, ExpressionVisitor::mutate is invoked recursively on all nodes of an expression tree. See the comments on Expr::rewrite for details on its use

Required methods

fn mutate(&mut self, expr: Expr) -> Result<Expr>[src]

Invoked after all children of expr have been mutated and returns a potentially modified expr.

Loading content...

Provided methods

fn pre_visit(&mut self, _expr: &Expr) -> Result<bool>[src]

Invoked before any children of expr are rewritten / visited. Default implementation returns Ok(true)

Loading content...

Implementors

Loading content...