pub unsafe fn mmap_unchecked<T: AsRef<[u8]>>(
metadata: &FileMetadata,
dictionaries: &Dictionaries,
data: Arc<T>,
chunk: usize,
) -> PolarsResult<RecordBatchT<Box<dyn Array>>>
Available on crate feature
io_ipc
only.Expand description
Memory maps an record batch from an IPC file into a RecordBatchT
.
§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