pub struct BooleanArrayV {
pub array: Arc<BooleanArray<()>>,
pub offset: usize,
/* private fields */
}Expand description
§BooleanArrayView
Borrowed, indexable view into a [offset .. offset + len) window of a
BooleanArray.
§Purpose
- Zero-copy access to contiguous bit-packed boolean values.
- Allows null counts for the view to be cached to speed up scans.
§Fields
array: the backingBooleanArraywrapped inArc.offset: starting index of the view.len: number of logical elements in the view.null_count: cached null count for this range.
§Notes
- Use
sliceto derive smaller views from this one. - Use
to_boolean_arrayto materialise the data.
Fields§
§array: Arc<BooleanArray<()>>The outer array that this view is derived from - we retain a reference to it. Importantly, this is the full array - not the view, and thus should not be accessed as though it were the view subset.
offset: usizeThe index offset from 0 that for where this view starts from the outer array
Implementations§
Source§impl BooleanArrayV
impl BooleanArrayV
Sourcepub fn new(
array: Arc<BooleanArray<()>>,
offset: usize,
len: usize,
) -> BooleanArrayV
pub fn new( array: Arc<BooleanArray<()>>, offset: usize, len: usize, ) -> BooleanArrayV
Creates a new BooleanArrayView with the given offset and length.
Sourcepub fn new_nc(
array: Arc<BooleanArray<()>>,
offset: usize,
len: usize,
null_count: usize,
) -> BooleanArrayV
pub fn new_nc( array: Arc<BooleanArray<()>>, offset: usize, len: usize, null_count: usize, ) -> BooleanArrayV
Creates a new BooleanArrayView with a precomputed null count.
Sourcepub fn get_bool(&self, i: usize) -> Option<bool>
pub fn get_bool(&self, i: usize) -> Option<bool>
Returns the value at logical index i as an Option<bool>.
Sourcepub fn slice(&self, offset: usize, len: usize) -> BooleanArrayV
pub fn slice(&self, offset: usize, len: usize) -> BooleanArrayV
Returns a sliced view into a subrange of this view.
Sourcepub fn inner_array(&self) -> Array
pub fn inner_array(&self) -> Array
Returns the full backing array wrapped as an Array enum, ignoring the view’s offset and length.
Use this to access inner array methods. The returned array is the unwindowed original.
Sourcepub fn to_boolean_array(&self) -> Arc<BooleanArray<()>>
pub fn to_boolean_array(&self) -> Arc<BooleanArray<()>>
Returns an owned BooleanArray clone of the window.
Sourcepub fn as_tuple(&self) -> (Arc<BooleanArray<()>>, usize, usize)
pub fn as_tuple(&self) -> (Arc<BooleanArray<()>>, usize, usize)
Returns the view as a tuple (array, offset, len).
Sourcepub fn null_count(&self) -> usize
pub fn null_count(&self) -> usize
Returns the number of nulls in the view.
Caches it after the first calculation.
Sourcepub fn null_mask_view(&self) -> Option<BitmaskV>
pub fn null_mask_view(&self) -> Option<BitmaskV>
Returns the null mask as a windowed BitmaskView.
Trait Implementations§
Source§impl Clone for BooleanArrayV
impl Clone for BooleanArrayV
Source§fn clone(&self) -> BooleanArrayV
fn clone(&self) -> BooleanArrayV
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Concatenate for BooleanArrayV
impl Concatenate for BooleanArrayV
Source§fn concat(self, other: BooleanArrayV) -> Result<BooleanArrayV, MinarrowError>
fn concat(self, other: BooleanArrayV) -> Result<BooleanArrayV, MinarrowError>
Concatenates two boolean array views by materialising both to owned boolean arrays, concatenating them, and wrapping the result back in a view.
§Notes
- This operation copies data from both views to create owned boolean arrays.
- The resulting view has offset=0 and length equal to the combined length.
Source§impl Debug for BooleanArrayV
impl Debug for BooleanArrayV
Source§impl Display for BooleanArrayV
impl Display for BooleanArrayV
Source§impl From<Arc<BooleanArray<()>>> for BooleanArrayV
impl From<Arc<BooleanArray<()>>> for BooleanArrayV
Source§fn from(array: Arc<BooleanArray<()>>) -> BooleanArrayV
fn from(array: Arc<BooleanArray<()>>) -> BooleanArrayV
Source§impl From<Array> for BooleanArrayV
impl From<Array> for BooleanArrayV
Source§fn from(array: Array) -> BooleanArrayV
fn from(array: Array) -> BooleanArrayV
Source§impl From<ArrayV> for BooleanArrayV
impl From<ArrayV> for BooleanArrayV
Source§fn from(view: ArrayV) -> BooleanArrayV
fn from(view: ArrayV) -> BooleanArrayV
Source§impl From<BooleanArrayV> for ArrayV
Available on crate feature views only.BooleanArrayView -> ArrayView
impl From<BooleanArrayV> for ArrayV
views only.BooleanArrayView -> ArrayView
Converts by wrapping the inner Arc