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

Method extend_from_iter_option

arrow-array/src/builder/primitive_builder.rs:269–281  ·  view source on GitHub ↗
(&mut self, iter: I)

Source from the content-addressed store, hash-verified

267 /// Panics if `values` and `is_valid` have different lengths
268 #[inline]
269 pub fn extend_from_iter_option<I: IntoIterator<Item = Option<T::Native>>>(&mut self, iter: I) {
270 let iter = iter.into_iter();
271 self.values_builder.extend(iter.map(|v| match v {
272 Some(v) => {
273 self.null_buffer_builder.append_non_null();
274 v
275 }
276 None => {
277 self.null_buffer_builder.append_null();
278 T::Native::default()
279 }
280 }));
281 }
282
283 /// Appends array values and null to this builder as is
284 /// (this means that underlying null values are copied as is).

Callers

nothing calls this directly

Calls 5

defaultFunction · 0.85
append_non_nullMethod · 0.80
into_iterMethod · 0.45
extendMethod · 0.45
append_nullMethod · 0.45

Tested by

no test coverage detected