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)
| 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 | /// |