accumulate_multiple

pub fn accumulate_multiple<T, F>(
    group_indices: &[usize],
    value_columns: &[&PrimitiveArray<T>],
    opt_filter: Option<&BooleanArray>,
    value_fn: F,
)
Expand description

Accumulates with multiple accumulate(value) columns. (e.g. corr(c1, c2))

This method assumes that for any input record index, if any of the value column is null, or it’s filtered out by opt_filter, then the record would be ignored. (won’t be accumulated by value_fn)

§Arguments

  • group_indices - To which groups do the rows in value_columns belong
  • value_columns - The input arrays to accumulate
  • opt_filter - Optional filter array. If present, only rows where filter is Some(true) are included
  • value_fn - Callback function for each valid row, with parameters:
    • group_idx: The group index for the current row
    • batch_idx: The index of the current row in the input arrays
    • columns: Reference to all input arrays for accessing values