datafusion_common::cse

Trait CSEController

Source
pub trait CSEController {
    type Node;

    // Required methods
    fn conditional_children(
        node: &Self::Node,
    ) -> Option<(Vec<&Self::Node>, Vec<&Self::Node>)>;
    fn is_valid(node: &Self::Node) -> bool;
    fn is_ignored(&self, node: &Self::Node) -> bool;
    fn generate_alias(&self) -> String;
    fn rewrite(&mut self, node: &Self::Node, alias: &str) -> Self::Node;

    // Provided methods
    fn rewrite_f_down(&mut self, _node: &Self::Node) { ... }
    fn rewrite_f_up(&mut self, _node: &Self::Node) { ... }
}
Expand description

The TreeNode specific definition of elimination.

Required Associated Types§

Source

type Node

The type of the tree nodes.

Required Methods§

Source

fn conditional_children( node: &Self::Node, ) -> Option<(Vec<&Self::Node>, Vec<&Self::Node>)>

Splits the children to normal and conditionally evaluated ones or returns None if all are always evaluated.

Source

fn is_valid(node: &Self::Node) -> bool

Source

fn is_ignored(&self, node: &Self::Node) -> bool

Source

fn generate_alias(&self) -> String

Source

fn rewrite(&mut self, node: &Self::Node, alias: &str) -> Self::Node

Provided Methods§

Source

fn rewrite_f_down(&mut self, _node: &Self::Node)

Source

fn rewrite_f_up(&mut self, _node: &Self::Node)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§