Skip to main content

SinkRender

Trait SinkRender 

Source
pub(crate) trait SinkRender<'scope> {
    // Required methods
    fn get_key_indices(&self) -> Option<&[usize]>;
    fn get_relation_key_indices(&self) -> Option<&[usize]>;
    fn render_sink(
        &self,
        storage_state: &mut StorageState,
        sink: &StorageSinkDesc<CollectionMetadata, Timestamp>,
        sink_id: GlobalId,
        batches: StreamVec<'scope, Timestamp, <TraceAgent<OrdValSpine<Option<Row>, Row, Timestamp, Diff>> as TraceReader>::Batch>,
        key_is_synthetic: bool,
        err_collection: VecCollection<'scope, Timestamp, DataflowError, Diff>,
    ) -> (StreamVec<'scope, Timestamp, HealthStatusMessage>, Vec<PressOnDropButton>);
}
Expand description

A type that can be rendered as a dataflow sink.

Required Methods§

Source

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

Gets the indexes of the columns that form the key that the user specified when creating the sink, if any.

Source

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

Gets the indexes of the columns that form a key of the sink’s underlying relation, if such a key exists.

Source

fn render_sink( &self, storage_state: &mut StorageState, sink: &StorageSinkDesc<CollectionMetadata, Timestamp>, sink_id: GlobalId, batches: StreamVec<'scope, Timestamp, <TraceAgent<OrdValSpine<Option<Row>, Row, Timestamp, Diff>> as TraceReader>::Batch>, key_is_synthetic: bool, err_collection: VecCollection<'scope, Timestamp, DataflowError, Diff>, ) -> (StreamVec<'scope, Timestamp, HealthStatusMessage>, Vec<PressOnDropButton>)

Renders the sink’s dataflow.

The sink receives a stream of arrangement batches keyed on Option<Row>. The sink is responsible for walking each batch (typically via mz_interchange::envelopes::for_each_diff_pair) and handling any envelope-specific diff-pair construction. When key_is_synthetic is true the arrangement’s key is a per-row hash used only for worker distribution — the sink should treat the key as absent when producing output.

Implementations on Foreign Types§

Source§

impl<'scope> SinkRender<'scope> for IcebergSinkConnection

Source§

impl<'scope> SinkRender<'scope> for KafkaSinkConnection

Implementors§