WindowFunction

Trait WindowFunction 

Source
pub trait WindowFunction: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn info(&self) -> FunctionInfo;
    fn process(
        &self,
        partition: &[Value],
        order_by: &[Value],
        current_row: usize,
    ) -> Result<Value>;
    fn clone_box(&self) -> Box<dyn WindowFunction>;
}
Expand description

Trait for window functions

Required Methods§

Source

fn name(&self) -> &str

Get the function name

Source

fn info(&self) -> FunctionInfo

Get function information

Source

fn process( &self, partition: &[Value], order_by: &[Value], current_row: usize, ) -> Result<Value>

Process the window function

§Arguments
  • partition - The partition of values
  • order_by - The ordering keys
  • current_row - The current row index (0-based)
Source

fn clone_box(&self) -> Box<dyn WindowFunction>

Clone the function into a new instance

Implementors§