Skip to main content

WindowPluginFn

Trait WindowPluginFn 

Source
pub trait WindowPluginFn: Send + Sync {
    // Required methods
    fn signature(&self) -> &WindowSignature;
    fn evaluate(
        &self,
        partition: &RecordBatch,
        frame: WindowFrame,
    ) -> Result<ArrayRef, FnError>;
}
Expand description

A Cypher window-function plugin.

Required Methods§

Source

fn signature(&self) -> &WindowSignature

Static signature.

Source

fn evaluate( &self, partition: &RecordBatch, frame: WindowFrame, ) -> Result<ArrayRef, FnError>

Evaluate the window function over a partition.

partition is the partition’s rows, already sorted per ORDER BY. frame describes the relative window over which each row’s value is computed. Implementations return an ArrayRef of length partition.num_rows().

§Errors

Returns FnError if the partition cannot be evaluated.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§