evaluate_max_window

Function evaluate_max_window 

Source
pub fn evaluate_max_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 MAX aggregate window function over a frame

Finds maximum value 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: MAX(salary) FILTER (WHERE active = 1) OVER (PARTITION BY department)