MCPcopy Create free account
hub / github.com/apache/arrow-rs / concat_bytes

Function concat_bytes

arrow-select/src/concat.rs:289–302  ·  view source on GitHub ↗
(arrays: &[&dyn Array])

Source from the content-addressed store, hash-verified

287}
288
289fn concat_bytes<T: ByteArrayType>(arrays: &[&dyn Array]) -> Result<ArrayRef, ArrowError> {
290 let (item_capacity, bytes_capacity) = match binary_capacity::<T>(arrays) {
291 Capacities::Binary(item_capacity, Some(bytes_capacity)) => (item_capacity, bytes_capacity),
292 _ => unreachable!(),
293 };
294
295 let mut builder = GenericByteBuilder::<T>::with_capacity(item_capacity, bytes_capacity);
296
297 for array in arrays {
298 builder.append_array(array.as_bytes::<T>())?;
299 }
300
301 Ok(Arc::new(builder.finish()))
302}
303
304fn concat_structs(arrays: &[&dyn Array], fields: &Fields) -> Result<ArrayRef, ArrowError> {
305 let mut len = 0;

Callers

nothing calls this directly

Calls 2

append_arrayMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected