MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / fused_value_window_func

Function fused_value_window_func

src/expr/src/relation/func.rs:1173–1187  ·  view source on GitHub ↗

Executes `FusedValueWindowFunc` on a reduction group. The expected input is in the format of `[((OriginalRow, (Args1, Args2, ...)), OrderByExprs...)]` where `Args1`, `Args2`, are the arguments of each of the fused functions. For functions that have only a single argument (first_value/last_value), these are simple values. For functions that have multiple arguments (lag/lead), these are also records

(
    input_datums: I,
    callers_temp_storage: &'a RowArena,
    funcs: &Vec<AggregateFunc>,
    order_by: &Vec<ColumnOrder>,
)

Source from the content-addressed store, hash-verified

1171/// have only a single argument (first_value/last_value), these are simple values. For functions
1172/// that have multiple arguments (lag/lead), these are also records.
1173fn fused_value_window_func<'a, I>(
1174 input_datums: I,
1175 callers_temp_storage: &'a RowArena,
1176 funcs: &Vec<AggregateFunc>,
1177 order_by: &Vec<ColumnOrder>,
1178) -> Datum<'a>
1179where
1180 I: IntoIterator<Item = Datum<'a>>,
1181{
1182 let temp_storage = RowArena::new();
1183 let iter = fused_value_window_func_no_list(input_datums, &temp_storage, funcs, order_by);
1184 callers_temp_storage.make_datum(|packer| {
1185 packer.push_list(iter);
1186 })
1187}
1188
1189/// Like `fused_value_window_func`, but doesn't perform the final wrapping in a list, returning an
1190/// Iterator instead.

Callers 1

eval_datumsMethod · 0.85

Calls 3

make_datumMethod · 0.80
push_listMethod · 0.80

Tested by

no test coverage detected