Function polars_arrow::ffi::mmap::bitmap_and_owner

source ·
pub unsafe fn bitmap_and_owner<O>(
    data: &[u8],
    offset: usize,
    length: usize,
    owner: O,
) -> PolarsResult<BooleanArray>
Expand description

Creates a (non-null) BooleanArray from a slice of bits. This does not have memcopy and is the fastest way to create a BooleanArray.

This can be useful if you want to apply arrow kernels on slices without incurring a memcopy cost.

The offset indicates where the first bit starts in the first byte.

§Safety

The caller must ensure the passed owner ensures the data remains alive.