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

Method append_block

arrow-array/src/builder/generic_bytes_view_builder.rs:194–201  ·  view source on GitHub ↗

Append a new data block returning the new block offset Note: this will first flush any in-progress block This allows appending views from blocks added using [`Self::append_block`]. See [`Self::append_value`] for appending individual values ``` # use arrow_array::builder::StringViewBuilder; let mut builder = StringViewBuilder::new(); let block = builder.append_block(b"helloworldbingobongo".into

(&mut self, buffer: Buffer)

Source from the content-addressed store, hash-verified

192 /// assert_eq!(actual, expected);
193 /// ```
194 pub fn append_block(&mut self, buffer: Buffer) -> u32 {
195 assert!(buffer.len() < u32::MAX as usize);
196
197 self.flush_in_progress();
198 let offset = self.completed.len();
199 self.push_completed(buffer);
200 offset as u32
201 }
202
203 /// Append a view of the given `block`, `offset` and `length`
204 ///

Callers 4

view_from_dict_valuesFunction · 0.45
test_caseFunction · 0.45
fromMethod · 0.45
test_gc_huge_arrayFunction · 0.45

Calls 3

flush_in_progressMethod · 0.80
push_completedMethod · 0.80
lenMethod · 0.45

Tested by 2

test_caseFunction · 0.36
test_gc_huge_arrayFunction · 0.36