Trait datafusion_expr::expr_rewriter::ExprRewriter
source · [−]pub trait ExprRewriter<E: ExprRewritable = Expr>: Sized {
fn mutate(&mut self, expr: E) -> Result<E>;
fn pre_visit(&mut self, _expr: &E) -> Result<RewriteRecursion> { ... }
}
Expand description
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
Provided Methods
fn pre_visit(&mut self, _expr: &E) -> Result<RewriteRecursion>
fn pre_visit(&mut self, _expr: &E) -> Result<RewriteRecursion>
Invoked before any children of expr
are rewritten /
visited. Default implementation returns Ok(RewriteRecursion::Continue)