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

Function first_value

src/expr/src/relation/func.rs:897–911  ·  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

895
896/// The expected input is in the format of [((OriginalRow, InputValue), OrderByExprs...)]
897fn first_value<'a, I>(
898 datums: I,
899 callers_temp_storage: &'a RowArena,
900 order_by: &[ColumnOrder],
901 window_frame: &WindowFrame,
902) -> Datum<'a>
903where
904 I: IntoIterator<Item = Datum<'a>>,
905{
906 let temp_storage = RowArena::new();
907 let iter = first_value_no_list(datums, &temp_storage, order_by, window_frame);
908 callers_temp_storage.make_datum(|packer| {
909 packer.push_list(iter);
910 })
911}
912
913/// Like `first_value`, but doesn't perform the final wrapping in a list, returning an Iterator
914/// instead.

Callers 1

eval_datumsMethod · 0.85

Calls 3

first_value_no_listFunction · 0.85
make_datumMethod · 0.80
push_listMethod · 0.80

Tested by

no test coverage detected