fn scan_string_capacity(
fields: &[VectorRef],
field_builders: &[Option<FieldBuilder>],
field_types: &[ConcreteDataType],
limit: i32,
) -> Result<bool>Expand description
Scans all string fields of a batch and checks whether they can be accommodated.
Every string field is checked (no early return on Ok(false)) so that an intrinsic
oversize in any field surfaces as an error even when an earlier field only overflows
the current builder.
Returns:
Ok(true)if every string field fits into the current builders;Ok(false)if no field is intrinsically oversized but at least one field only fits into an empty builder (the caller may freeze the current builder and replay the batch onto an empty one);Err(InvalidBatchSnafu)if any single field’s string data alone (space_needed, or the fact that its total bytes cannot even be represented asi32) exceedslimit, i.e. that field can never be accommodated by any builder.