evaluate_sum_window

Function evaluate_sum_window 

Source
pub fn evaluate_sum_window<F, I>(
    partition: &Partition,
    frame_indices: I,
    arg_expr: &Expression,
    filter: Option<&Expression>,
    eval_fn: F,
) -> SqlValue
where F: Fn(&Expression, &Row) -> Result<SqlValue, String>, I: IntoIterator<Item = usize>,
Expand description

Evaluate SUM aggregate window function over a frame

Sums numeric values in the frame, ignoring NULLs. Returns NULL if all values are NULL or frame is empty. Supports FILTER clause for conditional aggregation. Supports EXCLUDE clause via frame_indices iterator.

Example: SUM(amount) FILTER (WHERE status = ‘paid’) OVER (ORDER BY date) for filtered running totals