Function arrow2::mmap::mmap_unchecked
source · pub unsafe fn mmap_unchecked<T: AsRef<[u8]>>(
metadata: &FileMetadata,
dictionaries: &Dictionaries,
data: Arc<T>,
chunk: usize
) -> Result<Chunk<Box<dyn Array>>, Error>
Expand description
Memory maps an record batch from an IPC file into a Chunk
.
§Errors
This function errors when:
- The IPC file is not valid
- the buffers on the file are un-aligned with their corresponding data. This can happen when:
- the file was written with 8-bit alignment
- the file contains type decimal 128 or 256
§Safety
The caller must ensure that data
contains a valid buffers, for example:
- Offsets in variable-sized containers must be in-bounds and increasing
- Utf8 data is valid