polars_plan::plans::visitor

Trait RewritingVisitor

Source
pub trait RewritingVisitor {
    type Node;
    type Arena;

    // Required method
    fn mutate(
        &mut self,
        node: Self::Node,
        _arena: &mut Self::Arena,
    ) -> PolarsResult<Self::Node>;

    // Provided method
    fn pre_visit(
        &mut self,
        _node: &Self::Node,
        _arena: &mut Self::Arena,
    ) -> PolarsResult<RewriteRecursion> { ... }
}

Required Associated Types§

Required Methods§

Source

fn mutate( &mut self, node: Self::Node, _arena: &mut Self::Arena, ) -> PolarsResult<Self::Node>

Provided Methods§

Source

fn pre_visit( &mut self, _node: &Self::Node, _arena: &mut Self::Arena, ) -> PolarsResult<RewriteRecursion>

Invoked before any children of node are visited.

Implementors§