is_end_bound_safe_for_groups

Function is_end_bound_safe_for_groups 

Source
fn is_end_bound_safe_for_groups(
    end_bound: &WindowFrameBound,
    state: &WindowFrameStateGroups,
    orderby_col: &ArrayRef,
    most_recent_ob_col: Option<&ArrayRef>,
    sort_options: &SortOptions,
) -> Result<bool>
Expand description

For group-based window frames, determines whether the end bound calculation is safe by considering the group offset and whether the current row is ahead of the most recent row in terms of sorting. It checks if the end bound is within the bounds of the current group based on group end indices.

§Parameters

  • end_bound: Reference to the window frame bound in question.
  • state: The state of the window frame for group calculations.
  • orderby_col: Reference to the column used for ordering.
  • most_recent_ob_col: Optional reference to the most recent order-by column.
  • sort_options: The sorting options used in the window frame.

§Returns

A Result indicating whether the end bound is safe for group-based window frames.