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

Method ensure_long_capacity

datafusion/functions/src/strings.rs:728–735  ·  view source on GitHub ↗
(&mut self, length: u32)

Source from the content-addressed store, hash-verified

726 /// yet in `in_progress` — flushing mid-row would orphan partial data.
727 #[inline]
728 fn ensure_long_capacity(&mut self, length: u32) {
729 let required_cap = self.in_progress.len() + length as usize;
730 if self.in_progress.capacity() < required_cap {
731 self.flush_in_progress();
732 let to_reserve = (length as usize).max(self.next_block_size() as usize);
733 self.in_progress.reserve(to_reserve);
734 }
735 }
736
737 /// Encode a long-form view referencing `length` bytes already written
738 /// into the in-progress block at `offset`. `prefix_bytes` is the row's

Callers 3

append_byte_mapMethod · 0.80
write_strMethod · 0.80
write_charMethod · 0.80

Calls 6

next_block_sizeMethod · 0.80
reserveMethod · 0.80
lenMethod · 0.45
capacityMethod · 0.45
flush_in_progressMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected