pub struct ExprOrdering {
pub expr: Arc<dyn PhysicalExpr>,
pub state: SortProperties,
pub children: Vec<ExprOrdering>,
}Expand description
The ExprOrdering struct is designed to aid in the determination of ordering (represented
by SortProperties) for a given PhysicalExpr. When analyzing the orderings
of a PhysicalExpr, the process begins by assigning the ordering of its leaf nodes.
By propagating these leaf node orderings upwards in the expression tree, the overall
ordering of the entire PhysicalExpr can be derived.
This struct holds the necessary state information for each expression in the PhysicalExpr.
It encapsulates the orderings (state) associated with the expression (expr), and
orderings of the children expressions (children_states). The ExprOrdering of a parent
expression is determined based on the ExprOrdering states of its children expressions.
Fields§
§expr: Arc<dyn PhysicalExpr>§state: SortProperties§children: Vec<ExprOrdering>Implementations§
source§impl ExprOrdering
impl ExprOrdering
sourcepub fn new(expr: Arc<dyn PhysicalExpr>) -> Self
pub fn new(expr: Arc<dyn PhysicalExpr>) -> Self
Creates a new ExprOrdering with SortProperties::Unordered states
for expr and its children.
sourcepub fn children_state(&self) -> Vec<SortProperties>
pub fn children_state(&self) -> Vec<SortProperties>
Get a reference to each child state.
Trait Implementations§
source§impl Debug for ExprOrdering
impl Debug for ExprOrdering
source§impl TreeNode for ExprOrdering
impl TreeNode for ExprOrdering
source§fn apply_children<F>(&self, op: &mut F) -> Result<VisitRecursion>
fn apply_children<F>(&self, op: &mut F) -> Result<VisitRecursion>
F to the node’s childrensource§fn map_children<F>(self, transform: F) -> Result<Self>
fn map_children<F>(self, transform: F) -> Result<Self>
F to the node’s children, the transform F might have a direction(Preorder or Postorder)source§fn apply<F>(&self, op: &mut F) -> Result<VisitRecursion, DataFusionError>
fn apply<F>(&self, op: &mut F) -> Result<VisitRecursion, DataFusionError>
source§fn visit<V>(&self, visitor: &mut V) -> Result<VisitRecursion, DataFusionError>where
V: TreeNodeVisitor<N = Self>,
fn visit<V>(&self, visitor: &mut V) -> Result<VisitRecursion, DataFusionError>where
V: TreeNodeVisitor<N = Self>,
source§fn transform<F>(self, op: &F) -> Result<Self, DataFusionError>
fn transform<F>(self, op: &F) -> Result<Self, DataFusionError>
op to the node tree.
When op does not apply to a given node, it is left unchanged.
The default tree traversal direction is transform_up(Postorder Traversal).source§fn transform_down<F>(self, op: &F) -> Result<Self, DataFusionError>
fn transform_down<F>(self, op: &F) -> Result<Self, DataFusionError>
op does not apply to a given node, it is left unchanged.source§fn transform_down_mut<F>(self, op: &mut F) -> Result<Self, DataFusionError>
fn transform_down_mut<F>(self, op: &mut F) -> Result<Self, DataFusionError>
F.
When the op does not apply to a given node, it is left unchanged.source§fn transform_up<F>(self, op: &F) -> Result<Self, DataFusionError>
fn transform_up<F>(self, op: &F) -> Result<Self, DataFusionError>
op does not apply to a given node, it is left unchanged.source§fn transform_up_mut<F>(self, op: &mut F) -> Result<Self, DataFusionError>
fn transform_up_mut<F>(self, op: &mut F) -> Result<Self, DataFusionError>
F.
When the op does not apply to a given node, it is left unchanged.