Trait datafusion::logical_plan::ExpressionVisitor
source · [−]pub trait ExpressionVisitor<E = Expr> where
E: ExprVisitable, {
fn pre_visit(self, expr: &E) -> Result<Recursion<Self>, DataFusionError>
where
Self: ExpressionVisitor<Expr>;
fn post_visit(self, _expr: &E) -> Result<Self, DataFusionError> { ... }
}
Expand description
Encode the traversal of an expression tree. When passed to
Expr::accept
, ExpressionVisitor::visit
is invoked
recursively on all nodes of an expression tree. See the comments
on Expr::accept
for details on its use
Required Methods
fn pre_visit(self, expr: &E) -> Result<Recursion<Self>, DataFusionError> where
Self: ExpressionVisitor<Expr>,
fn pre_visit(self, expr: &E) -> Result<Recursion<Self>, DataFusionError> where
Self: ExpressionVisitor<Expr>,
Invoked before any children of expr
are visisted.
Provided Methods
fn post_visit(self, _expr: &E) -> Result<Self, DataFusionError>
fn post_visit(self, _expr: &E) -> Result<Self, DataFusionError>
Invoked after all children of expr
are visited. Default
implementation does nothing.