returns the null bit buffer. Rust implementation uses a buffer that is not part of the array of buffers. The C Data interface's null buffer is part of the array of buffers.
(&self)
| 555 | /// Rust implementation uses a buffer that is not part of the array of buffers. |
| 556 | /// The C Data interface's null buffer is part of the array of buffers. |
| 557 | fn null_bit_buffer(&self) -> Option<Buffer> { |
| 558 | // similar to `self.buffer_len(0)`, but without `Result`. |
| 559 | // `ffi::ArrowArray` records array offset, we need to add it back to the |
| 560 | // buffer length to get the actual buffer length. |
| 561 | let length = self.array.len() + self.array.offset(); |
| 562 | let buffer_len = bit_util::ceil(length, 8); |
| 563 | |
| 564 | unsafe { create_buffer(self.owner.clone(), self.array, 0, buffer_len) } |
| 565 | } |
| 566 | |
| 567 | fn dictionary(&self) -> Result<Option<ImportedArrowArray<'_>>> { |
| 568 | match (self.array.dictionary(), &self.data_type) { |