risingwave_expr::window_function

Trait WindowState

source
pub trait WindowState: EstimateSize {
    // Required methods
    fn append(&mut self, key: StateKey, args: SmallVec<[Datum; 2]>);
    fn curr_window(&self) -> StatePos<'_>;
    fn slide(&mut self) -> Result<(Datum, StateEvictHint)>;
    fn slide_no_output(&mut self) -> Result<StateEvictHint>;
}

Required Methods§

source

fn append(&mut self, key: StateKey, args: SmallVec<[Datum; 2]>)

Append a new input row to the state. The key is expected to be increasing.

source

fn curr_window(&self) -> StatePos<'_>

Get the current window frame position.

source

fn slide(&mut self) -> Result<(Datum, StateEvictHint)>

Slide the window frame forward and collect the output and evict hint. Similar to Iterator::next.

source

fn slide_no_output(&mut self) -> Result<StateEvictHint>

Slide the window frame forward and collect the evict hint. Don’t calculate the output if possible.

Implementors§