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

Function min_string

src/expr/src/relation/func.rs:102–114  ·  view source on GitHub ↗
(datums: I)

Source from the content-addressed store, hash-verified

100}
101
102fn min_string<'a, I>(datums: I) -> Datum<'a>
103where
104 I: IntoIterator<Item = Datum<'a>>,
105{
106 match datums
107 .into_iter()
108 .filter(|d| !d.is_null())
109 .min_by(|a, b| a.unwrap_str().cmp(b.unwrap_str()))
110 {
111 Some(datum) => datum,
112 None => Datum::Null,
113 }
114}
115
116fn sum_datum<'a, I, DatumType, ResultType>(datums: I) -> Datum<'a>
117where

Callers 2

eval_datumsMethod · 0.85
from_columnMethod · 0.85

Calls 5

unwrap_strMethod · 0.80
filterMethod · 0.45
into_iterMethod · 0.45
is_nullMethod · 0.45
cmpMethod · 0.45

Tested by

no test coverage detected