Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
ExecutionPlanVisitor in datafusion::physical_plan - Rust
[go: Go Back, main page]

pub trait ExecutionPlanVisitor {
    type Error;

    fn pre_visit(
        &mut self,
        plan: &dyn ExecutionPlan
    ) -> Result<bool, Self::Error>; fn post_visit(
        &mut self,
        _plan: &dyn ExecutionPlan
    ) -> Result<bool, Self::Error> { ... } }
Expand description

Trait that implements the Visitor pattern for a depth first walk of ExecutionPlan nodes. pre_visit is called before any children are visited, and then post_visit is called after all children have been visited. To use, define a struct that implements this trait and then invoke [‘accept’].

For example, for an execution plan that looks like:

ProjectionExec: #id
   FilterExec: state = CO
      CsvExec:

The sequence of visit operations would be:

visitor.pre_visit(ProjectionExec)
visitor.pre_visit(FilterExec)
visitor.pre_visit(CsvExec)
visitor.post_visit(CsvExec)
visitor.post_visit(FilterExec)
visitor.post_visit(ProjectionExec)

Required Associated Types

The type of error returned by this visitor

Required Methods

Invoked on an ExecutionPlan plan before any of its child inputs have been visited. If Ok(true) is returned, the recursion continues. If Err(..) or Ok(false) are returned, the recursion stops immediately and the error, if any, is returned to accept

Provided Methods

Invoked on an ExecutionPlan plan after all of its child inputs have been visited. The return value is handled the same as the return value of pre_visit. The provided default implementation returns Ok(true).

Implementors