MCPcopy Create free account
hub / github.com/apache/datafusion / append_with

Method append_with

datafusion/functions/src/strings.rs:519–530  ·  view source on GitHub ↗
(&mut self, f: F)

Source from the content-addressed store, hash-verified

517 /// Panics if the cumulative byte length exceeds `O::MAX`.
518 #[inline]
519 pub fn append_with<F>(&mut self, f: F)
520 where
521 F: FnOnce(&mut GenericStringWriter<'_>),
522 {
523 let mut writer = GenericStringWriter {
524 value_buffer: &mut self.value_buffer,
525 };
526 f(&mut writer);
527 let next_offset =
528 O::from_usize(self.value_buffer.len()).expect("byte array offset overflow");
529 self.offsets_buffer.push(next_offset);
530 }
531
532 /// Finalize into a [`GenericStringArray<O>`] using the caller-supplied
533 /// null buffer.

Calls 3

make_long_viewMethod · 0.80
lenMethod · 0.45
pushMethod · 0.45