Function mz_persist_types::arrow::maybe_trim_proto
source ยท fn maybe_trim_proto(
data_type: &mut DataType,
body: &mut ProtoArrayData,
max_len: usize,
)
Expand description
Makes a best effort to shrink the proto while preserving the ordering. (The proto might not be smaller after this method is called, but it should always be a valid lower bound.)
Note that we pass in the data type and the array data separately, since we only keep
type info at the top level. If a caller does have a top-level ArrayData
instance,
they should take that type and pass it in separately.