risingwave_frontend::optimizer::plan_node::plan_tree_node

Trait PlanTreeNode

source
pub trait PlanTreeNode {
    // Required methods
    fn inputs(&self) -> SmallVec<[PlanRef; 2]>;
    fn clone_with_inputs(&self, inputs: &[PlanRef]) -> PlanRef;
}
Expand description

The trait PlanNode really need about tree structure and used by optimizer framework. every plan node should impl it.

The trait PlanTreeNodeLeaf, PlanTreeNodeUnary and PlanTreeNodeBinary, is just special cases for PlanTreeNode. as long as you impl these trait for a plan node, we can easily impl the PlanTreeNode which is really need by framework with helper macros impl_plan_tree_node_for_leaf, impl_plan_tree_node_for_unary and impl_plan_tree_node_for_binary. We can’t auto impl PlanTreeNode for PlanTreeNodeLeaf/Unary/Binary, because compiler doesn’t know they are disjoint and thinks there are conflicting implementation.

And due to these three traits need not be used as dyn, it can return Self type, which is useful when implement rules and visitors. So we highly recommend not impl the PlanTreeNode trait directly, instead use these tree trait and impl PlanTreeNode use these helper macros.

Required Methods§

source

fn inputs(&self) -> SmallVec<[PlanRef; 2]>

Get input nodes of the plan.

source

fn clone_with_inputs(&self, inputs: &[PlanRef]) -> PlanRef

Clone the node with a list of new inputs.

Implementors§

source§

impl PlanTreeNode for BatchDelete

source§

impl PlanTreeNode for BatchExchange

source§

impl PlanTreeNode for BatchExpand

source§

impl PlanTreeNode for BatchFileScan

source§

impl PlanTreeNode for BatchFilter

source§

impl PlanTreeNode for BatchGroupTopN

source§

impl PlanTreeNode for BatchHashAgg

source§

impl PlanTreeNode for BatchHashJoin

source§

impl PlanTreeNode for BatchHopWindow

source§

impl PlanTreeNode for BatchIcebergScan

source§

impl PlanTreeNode for BatchInsert

source§

impl PlanTreeNode for BatchKafkaScan

source§

impl PlanTreeNode for BatchLimit

source§

impl PlanTreeNode for BatchLogSeqScan

source§

impl PlanTreeNode for BatchLookupJoin

source§

impl PlanTreeNode for BatchMaxOneRow

source§

impl PlanTreeNode for BatchMySqlQuery

source§

impl PlanTreeNode for BatchNestedLoopJoin

source§

impl PlanTreeNode for BatchOverWindow

source§

impl PlanTreeNode for BatchPostgresQuery

source§

impl PlanTreeNode for BatchProject

source§

impl PlanTreeNode for BatchProjectSet

source§

impl PlanTreeNode for BatchSeqScan

source§

impl PlanTreeNode for BatchSimpleAgg

source§

impl PlanTreeNode for BatchSort

source§

impl PlanTreeNode for BatchSortAgg

source§

impl PlanTreeNode for BatchSource

source§

impl PlanTreeNode for BatchSysSeqScan

source§

impl PlanTreeNode for BatchTableFunction

source§

impl PlanTreeNode for BatchTopN

source§

impl PlanTreeNode for BatchUnion

source§

impl PlanTreeNode for BatchUpdate

source§

impl PlanTreeNode for BatchValues

source§

impl PlanTreeNode for LogicalAgg

source§

impl PlanTreeNode for LogicalApply

source§

impl PlanTreeNode for LogicalCdcScan

source§

impl PlanTreeNode for LogicalChangeLog

source§

impl PlanTreeNode for LogicalCteRef

source§

impl PlanTreeNode for LogicalDedup

source§

impl PlanTreeNode for LogicalDelete

source§

impl PlanTreeNode for LogicalExcept

source§

impl PlanTreeNode for LogicalExpand

source§

impl PlanTreeNode for LogicalFileScan

source§

impl PlanTreeNode for LogicalFilter

source§

impl PlanTreeNode for LogicalHopWindow

source§

impl PlanTreeNode for LogicalIcebergScan

source§

impl PlanTreeNode for LogicalInsert

source§

impl PlanTreeNode for LogicalIntersect

source§

impl PlanTreeNode for LogicalJoin

source§

impl PlanTreeNode for LogicalKafkaScan

source§

impl PlanTreeNode for LogicalLimit

source§

impl PlanTreeNode for LogicalMaxOneRow

source§

impl PlanTreeNode for LogicalMultiJoin

source§

impl PlanTreeNode for LogicalMySqlQuery

source§

impl PlanTreeNode for LogicalNow

source§

impl PlanTreeNode for LogicalOverWindow

source§

impl PlanTreeNode for LogicalPostgresQuery

source§

impl PlanTreeNode for LogicalProject

source§

impl PlanTreeNode for LogicalProjectSet

source§

impl PlanTreeNode for LogicalRecursiveUnion

source§

impl PlanTreeNode for LogicalScan

source§

impl PlanTreeNode for LogicalShare

source§

impl PlanTreeNode for LogicalSource

source§

impl PlanTreeNode for LogicalSysScan

source§

impl PlanTreeNode for LogicalTableFunction

source§

impl PlanTreeNode for LogicalTopN

source§

impl PlanTreeNode for LogicalUnion

source§

impl PlanTreeNode for LogicalUpdate

source§

impl PlanTreeNode for LogicalValues

source§

impl PlanTreeNode for StreamAsOfJoin

source§

impl PlanTreeNode for StreamCdcTableScan

source§

impl PlanTreeNode for StreamChangeLog

source§

impl PlanTreeNode for StreamDedup

source§

impl PlanTreeNode for StreamDeltaJoin

source§

impl PlanTreeNode for StreamDml

source§

impl PlanTreeNode for StreamDynamicFilter

source§

impl PlanTreeNode for StreamEowcOverWindow

source§

impl PlanTreeNode for StreamExchange

source§

impl PlanTreeNode for StreamExpand

source§

impl PlanTreeNode for StreamFilter

source§

impl PlanTreeNode for StreamFsFetch

source§

impl PlanTreeNode for StreamGlobalApproxPercentile

source§

impl PlanTreeNode for StreamGroupTopN

source§

impl PlanTreeNode for StreamHashAgg

source§

impl PlanTreeNode for StreamHashJoin

source§

impl PlanTreeNode for StreamHopWindow

source§

impl PlanTreeNode for StreamLocalApproxPercentile

source§

impl PlanTreeNode for StreamMaterialize

source§

impl PlanTreeNode for StreamNow

source§

impl PlanTreeNode for StreamOverWindow

source§

impl PlanTreeNode for StreamProject

source§

impl PlanTreeNode for StreamProjectSet

source§

impl PlanTreeNode for StreamRowIdGen

source§

impl PlanTreeNode for StreamRowMerge

source§

impl PlanTreeNode for StreamShare

source§

impl PlanTreeNode for StreamSimpleAgg

source§

impl PlanTreeNode for StreamSink

source§

impl PlanTreeNode for StreamEowcSort

source§

impl PlanTreeNode for StreamSource

source§

impl PlanTreeNode for StreamSourceScan

source§

impl PlanTreeNode for StreamStatelessSimpleAgg

source§

impl PlanTreeNode for StreamTableScan

source§

impl PlanTreeNode for StreamTemporalJoin

source§

impl PlanTreeNode for StreamTopN

source§

impl PlanTreeNode for StreamUnion

source§

impl PlanTreeNode for StreamValues

source§

impl PlanTreeNode for StreamWatermarkFilter

source§

impl PlanTreeNode for PlanRef