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

Function last_value

src/expr/src/relation/func.rs:1018–1032  ·  view source on GitHub ↗

The expected input is in the format of [((OriginalRow, InputValue), OrderByExprs...)]

(
    datums: I,
    callers_temp_storage: &'a RowArena,
    order_by: &[ColumnOrder],
    window_frame: &WindowFrame,
)

Source from the content-addressed store, hash-verified

1016
1017/// The expected input is in the format of [((OriginalRow, InputValue), OrderByExprs...)]
1018fn last_value<'a, I>(
1019 datums: I,
1020 callers_temp_storage: &'a RowArena,
1021 order_by: &[ColumnOrder],
1022 window_frame: &WindowFrame,
1023) -> Datum<'a>
1024where
1025 I: IntoIterator<Item = Datum<'a>>,
1026{
1027 let temp_storage = RowArena::new();
1028 let iter = last_value_no_list(datums, &temp_storage, order_by, window_frame);
1029 callers_temp_storage.make_datum(|packer| {
1030 packer.push_list(iter);
1031 })
1032}
1033
1034/// Like `last_value`, but doesn't perform the final wrapping in a list, returning an Iterator
1035/// instead.

Callers 1

eval_datumsMethod · 0.85

Calls 3

last_value_no_listFunction · 0.85
make_datumMethod · 0.80
push_listMethod · 0.80

Tested by

no test coverage detected