Function mz_repr::stats::proto_datum_min_max_nulls
source · pub(crate) fn proto_datum_min_max_nulls(
col: &<Option<Vec<u8>> as Data>::Col,
validity: ValidityRef,
) -> (Vec<u8>, Vec<u8>, usize)
Expand description
Returns the min, max, and null_count for the column of Datums.
Each entry in the column is a single Datum encoded as a ProtoDatum. The min and max and similarly returned encoded via ProtoDatum. If the column is empty, the returned min and max will be Datum::Null, otherwise they will never be null.
NB: Vec<u8>
and Option<Vec<u8>>
happen to use the same type for Col.
It’s a bit odd to use the Option version for both, but it happens to work
because the non-option version won’t generate any Nulls.