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

Method append_nulls

arrow-array/src/builder/map_builder.rs:185–191  ·  view source on GitHub ↗
(&mut self, n: usize)

Source from the content-addressed store, hash-verified

183 /// Returns an error if the key and values builders are in an inconsistent state.
184 #[inline]
185 pub fn append_nulls(&mut self, n: usize) -> Result<(), ArrowError> {
186 self.validate_equal_lengths()?;
187 let offset = self.key_builder.len() as i32;
188 self.offsets_builder.extend(std::iter::repeat_n(offset, n));
189 self.null_buffer_builder.append_n_nulls(n);
190 Ok(())
191 }
192
193 /// Builds the [`MapArray`]
194 pub fn finish(&mut self) -> MapArray {

Calls 4

append_n_nullsMethod · 0.80
lenMethod · 0.45
extendMethod · 0.45