(arrays: &[&dyn Array])
| 287 | } |
| 288 | |
| 289 | fn 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 | |
| 304 | fn concat_structs(arrays: &[&dyn Array], fields: &Fields) -> Result<ArrayRef, ArrowError> { |
| 305 | let mut len = 0; |
nothing calls this directly
no test coverage detected