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

Method append_trusted_len_iter

arrow-array/src/builder/primitive_builder.rs:311–320  ·  view source on GitHub ↗
(&mut self, iter: impl IntoIterator<Item = T::Native>)

Source from the content-addressed store, hash-verified

309 /// the iterator implement `TrustedLen` once that is stabilized.
310 #[inline]
311 pub unsafe fn append_trusted_len_iter(&mut self, iter: impl IntoIterator<Item = T::Native>) {
312 let iter = iter.into_iter();
313 let len = iter
314 .size_hint()
315 .1
316 .expect("append_trusted_len_iter requires an upper bound");
317
318 self.null_buffer_builder.append_n_non_nulls(len);
319 self.values_builder.extend(iter);
320 }
321
322 /// Builds the [`PrimitiveArray`] and reset this builder.
323 pub fn finish(&mut self) -> PrimitiveArray<T> {

Calls 4

append_n_non_nullsMethod · 0.80
into_iterMethod · 0.45
size_hintMethod · 0.45
extendMethod · 0.45