Struct vortex_array::array::BoolArray
source · pub struct BoolArray(/* private fields */);
Implementations§
source§impl BoolArray
impl BoolArray
sourcepub fn into_buffer(self) -> Buffer
pub fn into_buffer(self) -> Buffer
Convert array into its internal buffer
sourcepub fn boolean_buffer(&self) -> BooleanBuffer
pub fn boolean_buffer(&self) -> BooleanBuffer
Get array values as an arrow BooleanBuffer
sourcepub fn into_boolean_builder(self) -> (BooleanBufferBuilder, usize)
pub fn into_boolean_builder(self) -> (BooleanBufferBuilder, usize)
Get a mutable version of this array.
If the caller holds the only reference to the underlying buffer the underlying buffer is returned otherwise a copy is created.
The second value of the tuple is a bit_offset of first value in first byte of the returned builder
pub fn validity(&self) -> Validity
sourcepub fn new(buffer: BooleanBuffer, nullability: Nullability) -> Self
pub fn new(buffer: BooleanBuffer, nullability: Nullability) -> Self
Create a new BoolArray from a buffer and nullability.
sourcepub fn try_new(buffer: BooleanBuffer, validity: Validity) -> VortexResult<Self>
pub fn try_new(buffer: BooleanBuffer, validity: Validity) -> VortexResult<Self>
Create a new BoolArray from a buffer and validity metadata. Returns an error if the validity length does not match the buffer length.
sourcepub fn from_indices<I: IntoIterator<Item = usize>>(
length: usize,
indices: I,
) -> Self
pub fn from_indices<I: IntoIterator<Item = usize>>( length: usize, indices: I, ) -> Self
Create a new BoolArray from a set of indices and a length. All indices must be less than the length.
Trait Implementations§
source§impl FillForwardFn<BoolArray> for BoolEncoding
impl FillForwardFn<BoolArray> for BoolEncoding
fn fill_forward(&self, array: &BoolArray) -> VortexResult<ArrayData>
source§impl FillNullFn<BoolArray> for BoolEncoding
impl FillNullFn<BoolArray> for BoolEncoding
source§impl FilterFn<BoolArray> for BoolEncoding
impl FilterFn<BoolArray> for BoolEncoding
source§impl From<BooleanBuffer> for BoolArray
impl From<BooleanBuffer> for BoolArray
source§fn from(value: BooleanBuffer) -> Self
fn from(value: BooleanBuffer) -> Self
Converts to this type from the input type.
source§impl FromIterator<bool> for BoolArray
impl FromIterator<bool> for BoolArray
source§impl IntoArrayData for BoolArray
impl IntoArrayData for BoolArray
fn into_array(self) -> ArrayData
source§impl IntoCanonical for BoolArray
impl IntoCanonical for BoolArray
fn into_canonical(self) -> VortexResult<Canonical>
fn into_arrow(self) -> VortexResult<ArrayRef>where
Self: Sized,
source§impl InvertFn<BoolArray> for BoolEncoding
impl InvertFn<BoolArray> for BoolEncoding
source§impl ScalarAtFn<BoolArray> for BoolEncoding
impl ScalarAtFn<BoolArray> for BoolEncoding
source§impl SliceFn<BoolArray> for BoolEncoding
impl SliceFn<BoolArray> for BoolEncoding
source§fn slice(
&self,
array: &BoolArray,
start: usize,
stop: usize,
) -> VortexResult<ArrayData>
fn slice( &self, array: &BoolArray, start: usize, stop: usize, ) -> VortexResult<ArrayData>
Return a zero-copy slice of an array, between
start
(inclusive) and end
(exclusive).
If start >= stop, returns an empty array of the same type as self
.
Assumes that start or stop are out of bounds, may panic otherwise.source§impl StatisticsVTable<BoolArray> for BoolEncoding
impl StatisticsVTable<BoolArray> for BoolEncoding
source§impl TakeFn<BoolArray> for BoolEncoding
impl TakeFn<BoolArray> for BoolEncoding
source§impl ValidityVTable<BoolArray> for BoolEncoding
impl ValidityVTable<BoolArray> for BoolEncoding
source§impl VariantsVTable<BoolArray> for BoolEncoding
impl VariantsVTable<BoolArray> for BoolEncoding
fn as_bool_array<'a>( &self, array: &'a BoolArray, ) -> Option<&'a dyn BoolArrayTrait>
fn as_null_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn NullArrayTrait>
fn as_primitive_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn PrimitiveArrayTrait>
fn as_utf8_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn Utf8ArrayTrait>
fn as_binary_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn BinaryArrayTrait>
fn as_struct_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn StructArrayTrait>
fn as_list_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn ListArrayTrait>
fn as_extension_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn ExtensionArrayTrait>
source§impl VisitorVTable<BoolArray> for BoolEncoding
impl VisitorVTable<BoolArray> for BoolEncoding
impl ArrayTrait for BoolArray
impl BoolArrayTrait for BoolArray
Auto Trait Implementations§
impl !Freeze for BoolArray
impl !RefUnwindSafe for BoolArray
impl Send for BoolArray
impl Sync for BoolArray
impl Unpin for BoolArray
impl !UnwindSafe for BoolArray
Blanket Implementations§
source§impl<T> ArrayEncodingRef for T
impl<T> ArrayEncodingRef for T
fn encoding(&self) -> &'static dyn EncodingVTable
source§impl<A> ArrayNBytes for A
impl<A> ArrayNBytes for A
source§impl<T> ArrayStatistics for T
impl<T> ArrayStatistics for T
fn statistics(&self) -> &dyn Statistics
fn inherit_statistics(&self, parent: &dyn Statistics)
source§impl<A> ArrayValidity for A
impl<A> ArrayValidity for A
source§fn is_valid(&self, index: usize) -> bool
fn is_valid(&self, index: usize) -> bool
Return whether the element at the given index is valid (true) or null (false).
source§fn logical_validity(&self) -> LogicalValidity
fn logical_validity(&self) -> LogicalValidity
Return the logical validity of the array.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoArrayVariant for Twhere
T: IntoCanonical,
impl<T> IntoArrayVariant for Twhere
T: IntoCanonical,
fn into_null(self) -> Result<NullArray, VortexError>
fn into_bool(self) -> Result<BoolArray, VortexError>
fn into_primitive(self) -> Result<PrimitiveArray, VortexError>
fn into_struct(self) -> Result<StructArray, VortexError>
fn into_list(self) -> Result<ListArray, VortexError>
fn into_varbinview(self) -> Result<VarBinViewArray, VortexError>
fn into_extension(self) -> Result<ExtensionArray, VortexError>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more