Path: blob/main/crates/polars-plan/src/plans/visitor/mod.rs
6940 views
//! Defines different visitor patterns and for any tree.12use arrow::legacy::error::PolarsResult;3mod expr;4#[cfg(feature = "cse")]5mod hash;6mod lp;7mod visitors;89pub use expr::*;10pub use lp::*;11pub use visitors::*;1213/// Controls how the [`TreeWalker`] recursion should proceed for [`TreeWalker::visit`].14#[derive(Debug)]15pub enum VisitRecursion {16/// Continue the visit to this node tree.17Continue,18/// Keep recursive but skip applying op on the children19Skip,20/// Stop the visit to this node tree.21Stop,22}2324/// Controls how the [`TreeWalker`] recursion should proceed for [`TreeWalker::rewrite`].25#[derive(Debug)]26pub enum RewriteRecursion {27/// Continue the visit to this node and children.28MutateAndContinue,29/// Don't mutate this node, continue visiting the children30NoMutateAndContinue,31/// Stop and return.32/// This doesn't visit the children33Stop,34/// Call `op` immediately and return35/// This doesn't visit the children36MutateAndStop,37}383940