risingwave_frontend::optimizer::plan_node

Trait PlanNode

source
pub trait PlanNode:
    PlanTreeNode
    + DynClone
    + DynEq
    + DynHash
    + Distill
    + Debug
    + Downcast
    + ColPrunable
    + ExprRewritable
    + ExprVisitable
    + ToBatch
    + ToStream
    + ToDistributedBatch
    + ToPb
    + ToLocalBatch
    + PredicatePushdown
    + AnyPlanNodeMeta { }
Expand description

The common trait over all plan nodes. Used by optimizer framework which will treat all node as dyn PlanNode

We split the trait into lots of sub-trait so that we can easily use macro to impl them.

Implementations§

source§

impl dyn PlanNode

source

pub fn is<__T: PlanNode>(&self) -> bool

Returns true if the trait object wraps an object of type __T.

source

pub fn downcast<__T: PlanNode>(self: Box<Self>) -> Result<Box<__T>, Box<Self>>

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

source

pub fn downcast_rc<__T: PlanNode>(self: Rc<Self>) -> Result<Rc<__T>, Rc<Self>>

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

source

pub fn downcast_ref<__T: PlanNode>(&self) -> Option<&__T>

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

source

pub fn downcast_mut<__T: PlanNode>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

source§

impl dyn PlanNode

Directly implement methods for PlanNode to access the fields defined in GenericPlanRef.

source

pub fn id(&self) -> PlanNodeId

source

pub fn ctx(&self) -> OptimizerContextRef

source

pub fn schema(&self) -> &Schema

source

pub fn stream_key(&self) -> Option<&[usize]>

source

pub fn functional_dependency(&self) -> &FunctionalDependencySet

source§

impl dyn PlanNode

source

pub fn to_stream_prost( &self, state: &mut BuildFragmentGraphState, ) -> Result<PbStreamPlan, SchedulerError>

Serialize the plan node and its children to a stream plan proto.

Note that some operators has their own implementation of to_stream_prost. We have a hook inside to do some ad-hoc things.

source

pub fn to_batch_prost(&self) -> Result<PbBatchPlan, SchedulerError>

Serialize the plan node and its children to a batch plan proto.

source

pub fn to_batch_prost_identity( &self, identity: bool, ) -> Result<PbBatchPlan, SchedulerError>

Serialize the plan node and its children to a batch plan proto without the identity field (for testing).

source

pub fn explain_myself_to_string(&self) -> String

source§

impl dyn PlanNode

source

pub fn as_logical_agg(&self) -> Option<&LogicalAgg>

source

pub fn as_logical_apply(&self) -> Option<&LogicalApply>

source

pub fn as_logical_filter(&self) -> Option<&LogicalFilter>

source

pub fn as_logical_project(&self) -> Option<&LogicalProject>

source

pub fn as_logical_scan(&self) -> Option<&LogicalScan>

source

pub fn as_logical_cdc_scan(&self) -> Option<&LogicalCdcScan>

source

pub fn as_logical_sys_scan(&self) -> Option<&LogicalSysScan>

source

pub fn as_logical_source(&self) -> Option<&LogicalSource>

source

pub fn as_logical_insert(&self) -> Option<&LogicalInsert>

source

pub fn as_logical_delete(&self) -> Option<&LogicalDelete>

source

pub fn as_logical_update(&self) -> Option<&LogicalUpdate>

source

pub fn as_logical_join(&self) -> Option<&LogicalJoin>

source

pub fn as_logical_values(&self) -> Option<&LogicalValues>

source

pub fn as_logical_limit(&self) -> Option<&LogicalLimit>

source

pub fn as_logical_top_n(&self) -> Option<&LogicalTopN>

source

pub fn as_logical_hop_window(&self) -> Option<&LogicalHopWindow>

source

pub fn as_logical_table_function(&self) -> Option<&LogicalTableFunction>

source

pub fn as_logical_multi_join(&self) -> Option<&LogicalMultiJoin>

source

pub fn as_logical_expand(&self) -> Option<&LogicalExpand>

source

pub fn as_logical_project_set(&self) -> Option<&LogicalProjectSet>

source

pub fn as_logical_union(&self) -> Option<&LogicalUnion>

source

pub fn as_logical_over_window(&self) -> Option<&LogicalOverWindow>

source

pub fn as_logical_share(&self) -> Option<&LogicalShare>

source

pub fn as_logical_now(&self) -> Option<&LogicalNow>

source

pub fn as_logical_dedup(&self) -> Option<&LogicalDedup>

source

pub fn as_logical_intersect(&self) -> Option<&LogicalIntersect>

source

pub fn as_logical_except(&self) -> Option<&LogicalExcept>

source

pub fn as_logical_max_one_row(&self) -> Option<&LogicalMaxOneRow>

source

pub fn as_logical_kafka_scan(&self) -> Option<&LogicalKafkaScan>

source

pub fn as_logical_iceberg_scan(&self) -> Option<&LogicalIcebergScan>

source

pub fn as_logical_recursive_union(&self) -> Option<&LogicalRecursiveUnion>

source

pub fn as_logical_cte_ref(&self) -> Option<&LogicalCteRef>

source

pub fn as_logical_change_log(&self) -> Option<&LogicalChangeLog>

source

pub fn as_logical_file_scan(&self) -> Option<&LogicalFileScan>

source

pub fn as_logical_postgres_query(&self) -> Option<&LogicalPostgresQuery>

source

pub fn as_logical_my_sql_query(&self) -> Option<&LogicalMySqlQuery>

source

pub fn as_batch_simple_agg(&self) -> Option<&BatchSimpleAgg>

source

pub fn as_batch_hash_agg(&self) -> Option<&BatchHashAgg>

source

pub fn as_batch_sort_agg(&self) -> Option<&BatchSortAgg>

source

pub fn as_batch_project(&self) -> Option<&BatchProject>

source

pub fn as_batch_filter(&self) -> Option<&BatchFilter>

source

pub fn as_batch_insert(&self) -> Option<&BatchInsert>

source

pub fn as_batch_delete(&self) -> Option<&BatchDelete>

source

pub fn as_batch_update(&self) -> Option<&BatchUpdate>

source

pub fn as_batch_seq_scan(&self) -> Option<&BatchSeqScan>

source

pub fn as_batch_sys_seq_scan(&self) -> Option<&BatchSysSeqScan>

source

pub fn as_batch_log_seq_scan(&self) -> Option<&BatchLogSeqScan>

source

pub fn as_batch_hash_join(&self) -> Option<&BatchHashJoin>

source

pub fn as_batch_nested_loop_join(&self) -> Option<&BatchNestedLoopJoin>

source

pub fn as_batch_values(&self) -> Option<&BatchValues>

source

pub fn as_batch_sort(&self) -> Option<&BatchSort>

source

pub fn as_batch_exchange(&self) -> Option<&BatchExchange>

source

pub fn as_batch_limit(&self) -> Option<&BatchLimit>

source

pub fn as_batch_top_n(&self) -> Option<&BatchTopN>

source

pub fn as_batch_hop_window(&self) -> Option<&BatchHopWindow>

source

pub fn as_batch_table_function(&self) -> Option<&BatchTableFunction>

source

pub fn as_batch_expand(&self) -> Option<&BatchExpand>

source

pub fn as_batch_lookup_join(&self) -> Option<&BatchLookupJoin>

source

pub fn as_batch_project_set(&self) -> Option<&BatchProjectSet>

source

pub fn as_batch_union(&self) -> Option<&BatchUnion>

source

pub fn as_batch_group_top_n(&self) -> Option<&BatchGroupTopN>

source

pub fn as_batch_source(&self) -> Option<&BatchSource>

source

pub fn as_batch_over_window(&self) -> Option<&BatchOverWindow>

source

pub fn as_batch_max_one_row(&self) -> Option<&BatchMaxOneRow>

source

pub fn as_batch_kafka_scan(&self) -> Option<&BatchKafkaScan>

source

pub fn as_batch_iceberg_scan(&self) -> Option<&BatchIcebergScan>

source

pub fn as_batch_file_scan(&self) -> Option<&BatchFileScan>

source

pub fn as_batch_postgres_query(&self) -> Option<&BatchPostgresQuery>

source

pub fn as_batch_my_sql_query(&self) -> Option<&BatchMySqlQuery>

source

pub fn as_stream_project(&self) -> Option<&StreamProject>

source

pub fn as_stream_filter(&self) -> Option<&StreamFilter>

source

pub fn as_stream_table_scan(&self) -> Option<&StreamTableScan>

source

pub fn as_stream_cdc_table_scan(&self) -> Option<&StreamCdcTableScan>

source

pub fn as_stream_sink(&self) -> Option<&StreamSink>

source

pub fn as_stream_source(&self) -> Option<&StreamSource>

source

pub fn as_stream_source_scan(&self) -> Option<&StreamSourceScan>

source

pub fn as_stream_hash_join(&self) -> Option<&StreamHashJoin>

source

pub fn as_stream_exchange(&self) -> Option<&StreamExchange>

source

pub fn as_stream_hash_agg(&self) -> Option<&StreamHashAgg>

source

pub fn as_stream_simple_agg(&self) -> Option<&StreamSimpleAgg>

source

pub fn as_stream_stateless_simple_agg( &self, ) -> Option<&StreamStatelessSimpleAgg>

source

pub fn as_stream_materialize(&self) -> Option<&StreamMaterialize>

source

pub fn as_stream_top_n(&self) -> Option<&StreamTopN>

source

pub fn as_stream_hop_window(&self) -> Option<&StreamHopWindow>

source

pub fn as_stream_delta_join(&self) -> Option<&StreamDeltaJoin>

source

pub fn as_stream_expand(&self) -> Option<&StreamExpand>

source

pub fn as_stream_dynamic_filter(&self) -> Option<&StreamDynamicFilter>

source

pub fn as_stream_project_set(&self) -> Option<&StreamProjectSet>

source

pub fn as_stream_group_top_n(&self) -> Option<&StreamGroupTopN>

source

pub fn as_stream_union(&self) -> Option<&StreamUnion>

source

pub fn as_stream_row_id_gen(&self) -> Option<&StreamRowIdGen>

source

pub fn as_stream_dml(&self) -> Option<&StreamDml>

source

pub fn as_stream_now(&self) -> Option<&StreamNow>

source

pub fn as_stream_share(&self) -> Option<&StreamShare>

source

pub fn as_stream_watermark_filter(&self) -> Option<&StreamWatermarkFilter>

source

pub fn as_stream_temporal_join(&self) -> Option<&StreamTemporalJoin>

source

pub fn as_stream_values(&self) -> Option<&StreamValues>

source

pub fn as_stream_dedup(&self) -> Option<&StreamDedup>

source

pub fn as_stream_eowc_over_window(&self) -> Option<&StreamEowcOverWindow>

source

pub fn as_stream_eowc_sort(&self) -> Option<&StreamEowcSort>

source

pub fn as_stream_over_window(&self) -> Option<&StreamOverWindow>

source

pub fn as_stream_fs_fetch(&self) -> Option<&StreamFsFetch>

source

pub fn as_stream_change_log(&self) -> Option<&StreamChangeLog>

source

pub fn as_stream_global_approx_percentile( &self, ) -> Option<&StreamGlobalApproxPercentile>

source

pub fn as_stream_local_approx_percentile( &self, ) -> Option<&StreamLocalApproxPercentile>

source

pub fn as_stream_row_merge(&self) -> Option<&StreamRowMerge>

source

pub fn as_stream_as_of_join(&self) -> Option<&StreamAsOfJoin>

Trait Implementations§

source§

impl Hash for dyn PlanNode

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
source§

impl PartialEq for dyn PlanNode

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for dyn PlanNode

Implementors§

source§

impl PlanNode for BatchDelete

source§

impl PlanNode for BatchExchange

source§

impl PlanNode for BatchExpand

source§

impl PlanNode for BatchFileScan

source§

impl PlanNode for BatchFilter

source§

impl PlanNode for BatchGroupTopN

source§

impl PlanNode for BatchHashAgg

source§

impl PlanNode for BatchHashJoin

source§

impl PlanNode for BatchHopWindow

source§

impl PlanNode for BatchIcebergScan

source§

impl PlanNode for BatchInsert

source§

impl PlanNode for BatchKafkaScan

source§

impl PlanNode for BatchLimit

source§

impl PlanNode for BatchLogSeqScan

source§

impl PlanNode for BatchLookupJoin

source§

impl PlanNode for BatchMaxOneRow

source§

impl PlanNode for BatchMySqlQuery

source§

impl PlanNode for BatchNestedLoopJoin

source§

impl PlanNode for BatchOverWindow

source§

impl PlanNode for BatchPostgresQuery

source§

impl PlanNode for BatchProject

source§

impl PlanNode for BatchProjectSet

source§

impl PlanNode for BatchSeqScan

source§

impl PlanNode for BatchSimpleAgg

source§

impl PlanNode for BatchSort

source§

impl PlanNode for BatchSortAgg

source§

impl PlanNode for BatchSource

source§

impl PlanNode for BatchSysSeqScan

source§

impl PlanNode for BatchTableFunction

source§

impl PlanNode for BatchTopN

source§

impl PlanNode for BatchUnion

source§

impl PlanNode for BatchUpdate

source§

impl PlanNode for BatchValues

source§

impl PlanNode for LogicalAgg

source§

impl PlanNode for LogicalApply

source§

impl PlanNode for LogicalCdcScan

source§

impl PlanNode for LogicalChangeLog

source§

impl PlanNode for LogicalCteRef

source§

impl PlanNode for LogicalDedup

source§

impl PlanNode for LogicalDelete

source§

impl PlanNode for LogicalExcept

source§

impl PlanNode for LogicalExpand

source§

impl PlanNode for LogicalFileScan

source§

impl PlanNode for LogicalFilter

source§

impl PlanNode for LogicalHopWindow

source§

impl PlanNode for LogicalIcebergScan

source§

impl PlanNode for LogicalInsert

source§

impl PlanNode for LogicalIntersect

source§

impl PlanNode for LogicalJoin

source§

impl PlanNode for LogicalKafkaScan

source§

impl PlanNode for LogicalLimit

source§

impl PlanNode for LogicalMaxOneRow

source§

impl PlanNode for LogicalMultiJoin

source§

impl PlanNode for LogicalMySqlQuery

source§

impl PlanNode for LogicalNow

source§

impl PlanNode for LogicalOverWindow

source§

impl PlanNode for LogicalPostgresQuery

source§

impl PlanNode for LogicalProject

source§

impl PlanNode for LogicalProjectSet

source§

impl PlanNode for LogicalRecursiveUnion

source§

impl PlanNode for LogicalScan

source§

impl PlanNode for LogicalShare

source§

impl PlanNode for LogicalSource

source§

impl PlanNode for LogicalSysScan

source§

impl PlanNode for LogicalTableFunction

source§

impl PlanNode for LogicalTopN

source§

impl PlanNode for LogicalUnion

source§

impl PlanNode for LogicalUpdate

source§

impl PlanNode for LogicalValues

source§

impl PlanNode for StreamAsOfJoin

source§

impl PlanNode for StreamCdcTableScan

source§

impl PlanNode for StreamChangeLog

source§

impl PlanNode for StreamDedup

source§

impl PlanNode for StreamDeltaJoin

source§

impl PlanNode for StreamDml

source§

impl PlanNode for StreamDynamicFilter

source§

impl PlanNode for StreamEowcOverWindow

source§

impl PlanNode for StreamExchange

source§

impl PlanNode for StreamExpand

source§

impl PlanNode for StreamFilter

source§

impl PlanNode for StreamFsFetch

source§

impl PlanNode for StreamGlobalApproxPercentile

source§

impl PlanNode for StreamGroupTopN

source§

impl PlanNode for StreamHashAgg

source§

impl PlanNode for StreamHashJoin

source§

impl PlanNode for StreamHopWindow

source§

impl PlanNode for StreamLocalApproxPercentile

source§

impl PlanNode for StreamMaterialize

source§

impl PlanNode for StreamNow

source§

impl PlanNode for StreamOverWindow

source§

impl PlanNode for StreamProject

source§

impl PlanNode for StreamProjectSet

source§

impl PlanNode for StreamRowIdGen

source§

impl PlanNode for StreamRowMerge

source§

impl PlanNode for StreamShare

source§

impl PlanNode for StreamSimpleAgg

source§

impl PlanNode for StreamSink

source§

impl PlanNode for StreamEowcSort

source§

impl PlanNode for StreamSource

source§

impl PlanNode for StreamSourceScan

source§

impl PlanNode for StreamStatelessSimpleAgg

source§

impl PlanNode for StreamTableScan

source§

impl PlanNode for StreamTemporalJoin

source§

impl PlanNode for StreamTopN

source§

impl PlanNode for StreamUnion

source§

impl PlanNode for StreamValues

source§

impl PlanNode for StreamWatermarkFilter