Skip to main content

count_within_budget_offsets

Function count_within_budget_offsets 

Source
fn count_within_budget_offsets<T: ByteArrayType>(
    values: &GenericByteArray<T>,
    indices: &[usize],
    byte_budget: usize,
) -> usize
Expand description

Number of leading indices whose cumulative plain-encoded size fits byte_budget (boundary value included), for offset-buffer byte arrays (Utf8/LargeUtf8/Binary/LargeBinary).

indices are assumed sorted ascending — they always are here, since they come from non_null_indices, which is built in array order.