pub trait WindowAggregate<A, T>: Aggregate<A, T>{
    // Required methods
    fn value(&self, acc: Option<&mut A>) -> Result<T>;
    fn inverse(&self, ctx: &mut Context<'_>, acc: &mut A) -> Result<()>;
}
Available on crate features functions and window only.
Expand description

WindowAggregate is the callback interface for user-defined aggregate window function.

Required Methods§

source

fn value(&self, acc: Option<&mut A>) -> Result<T>

Returns the current value of the aggregate. Unlike xFinal, the implementation should not delete any context.

source

fn inverse(&self, ctx: &mut Context<'_>, acc: &mut A) -> Result<()>

Removes a row from the current window.

Implementors§