pub trait AppendOnlyTopNCacheTrait {
// Required method
fn insert<S: StateStore>(
&mut self,
cache_key: (Vec<u8>, Vec<u8>),
row_ref: RowRef<'_>,
staging: &mut TopNStaging,
managed_state: &mut ManagedTopNState<S>,
row_deserializer: &RowDeserializer,
) -> StreamExecutorResult<()>;
}Expand description
Similar to TopNCacheTrait, but for append-only TopN.
Required Methods§
Sourcefn insert<S: StateStore>(
&mut self,
cache_key: (Vec<u8>, Vec<u8>),
row_ref: RowRef<'_>,
staging: &mut TopNStaging,
managed_state: &mut ManagedTopNState<S>,
row_deserializer: &RowDeserializer,
) -> StreamExecutorResult<()>
fn insert<S: StateStore>( &mut self, cache_key: (Vec<u8>, Vec<u8>), row_ref: RowRef<'_>, staging: &mut TopNStaging, managed_state: &mut ManagedTopNState<S>, row_deserializer: &RowDeserializer, ) -> StreamExecutorResult<()>
Insert input row to corresponding cache range according to its order key.
Changes in self.middle is recorded to res_ops and res_rows, which will be
used to generate messages to be sent to downstream operators.
managed_state is required because different from normal TopN, append-only TopN
doesn’t insert all rows into the state table.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".