pub struct StreamScanNode {
pub table_id: u32,
pub upstream_column_ids: Vec<i32>,
pub output_indices: Vec<u32>,
pub stream_scan_type: i32,
pub state_table: Option<Table>,
pub table_desc: Option<StorageTableDesc>,
pub rate_limit: Option<u32>,
pub snapshot_read_barrier_interval: u32,
pub arrangement_table: Option<Table>,
}
Expand description
StreamScanNode reads data from upstream table first, and then pass all events to downstream. It always these 2 inputs in the following order:
- A MergeNode (as a placeholder) of upstream.
- A BatchPlanNode for the snapshot read.
Fields§
§table_id: u32
§upstream_column_ids: Vec<i32>
The columns from the upstream table that’ll be internally required by this stream scan node.
- For non-backfill stream scan node, it’s the same as the output columns.
- For backfill stream scan node, there’re additionally primary key columns.
output_indices: Vec<u32>
The columns to be output by this stream scan node. The index is based on the internal required columns.
- For non-backfill stream scan node, it’s simply all the columns.
- For backfill stream scan node, this strips the primary key columns if they’re unnecessary.
stream_scan_type: i32
Generally, the barrier needs to be rearranged during the MV creation process, so that data can be flushed to shared buffer periodically, instead of making the first epoch from batch query extra large. However, in some cases, e.g., shared state, the barrier cannot be rearranged in StreamScanNode. StreamScanType is used to decide which implementation for the StreamScanNode.
state_table: Option<Table>
/ The state table used by Backfill operator for persisting internal state
table_desc: Option<StorageTableDesc>
The upstream materialized view info used by backfill.
Used iff ChainType::Backfill
.
rate_limit: Option<u32>
The backfill rate limit for the stream scan node.
snapshot_read_barrier_interval: u32
Snapshot read every N barriers
arrangement_table: Option<Table>
The state table used by ArrangementBackfill to replicate upstream mview’s state table.
Used iff ChainType::ArrangementBackfill
.
Implementations§
source§impl StreamScanNode
impl StreamScanNode
sourcepub fn stream_scan_type(&self) -> StreamScanType
pub fn stream_scan_type(&self) -> StreamScanType
Returns the enum value of stream_scan_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_stream_scan_type(&mut self, value: StreamScanType)
pub fn set_stream_scan_type(&mut self, value: StreamScanType)
Sets stream_scan_type
to the provided enum value.
sourcepub fn rate_limit(&self) -> u32
pub fn rate_limit(&self) -> u32
Returns the value of rate_limit
, or the default value if rate_limit
is unset.
source§impl StreamScanNode
impl StreamScanNode
pub fn get_table_id(&self) -> u32
pub fn get_upstream_column_ids(&self) -> &Vec<i32>
pub fn get_output_indices(&self) -> &Vec<u32>
pub fn get_stream_scan_type(&self) -> Result<StreamScanType, PbFieldNotFound>
pub fn get_state_table(&self) -> Result<&Table, PbFieldNotFound>
pub fn get_table_desc(&self) -> Result<&StorageTableDesc, PbFieldNotFound>
pub fn get_rate_limit(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_snapshot_read_barrier_interval(&self) -> u32
pub fn get_arrangement_table(&self) -> Result<&Table, PbFieldNotFound>
Trait Implementations§
source§impl Clone for StreamScanNode
impl Clone for StreamScanNode
source§fn clone(&self) -> StreamScanNode
fn clone(&self) -> StreamScanNode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StreamScanNode
impl Debug for StreamScanNode
source§impl Default for StreamScanNode
impl Default for StreamScanNode
source§impl<'de> Deserialize<'de> for StreamScanNode
impl<'de> Deserialize<'de> for StreamScanNode
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl Message for StreamScanNode
impl Message for StreamScanNode
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for StreamScanNode
impl PartialEq for StreamScanNode
source§impl Serialize for StreamScanNode
impl Serialize for StreamScanNode
impl StructuralPartialEq for StreamScanNode
Auto Trait Implementations§
impl Freeze for StreamScanNode
impl RefUnwindSafe for StreamScanNode
impl Send for StreamScanNode
impl Sync for StreamScanNode
impl Unpin for StreamScanNode
impl UnwindSafe for StreamScanNode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request