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
pub fn try_new(buffer: BooleanBuffer, validity: Validity) -> VortexResult<Self>
pub fn from_vec(bools: Vec<bool>, validity: Validity) -> Self
pub fn patch<P: AsPrimitive<usize>>( self, positions: &[P], values: BoolArray, ) -> VortexResult<Self>
Trait Implementations§
Source§impl AcceptArrayVisitor for BoolArray
impl AcceptArrayVisitor for BoolArray
fn accept(&self, visitor: &mut dyn ArrayVisitor) -> VortexResult<()>
Source§impl AndFn for BoolArray
impl AndFn for BoolArray
Source§fn and(&self, array: &Array) -> VortexResult<Array>
fn and(&self, array: &Array) -> VortexResult<Array>
Point-wise logical and between two Boolean arrays. Read more
Source§fn and_kleene(&self, array: &Array) -> VortexResult<Array>
fn and_kleene(&self, array: &Array) -> VortexResult<Array>
Point-wise Kleene logical and between two Boolean arrays. Read more
Source§impl ArrayAccessor<bool> for BoolArray
impl ArrayAccessor<bool> for BoolArray
Source§fn with_iterator<F, R>(&self, f: F) -> VortexResult<R>
fn with_iterator<F, R>(&self, f: F) -> VortexResult<R>
Iterate over each element of the array, in-order. Read more
Source§impl ArrayCompute for BoolArray
impl ArrayCompute for BoolArray
Source§fn fill_forward(&self) -> Option<&dyn FillForwardFn>
fn fill_forward(&self) -> Option<&dyn FillForwardFn>
Array function that returns new arrays a non-null value is repeated across runs of nulls. Read more
Source§fn scalar_at(&self) -> Option<&dyn ScalarAtFn>
fn scalar_at(&self) -> Option<&dyn ScalarAtFn>
Single item indexing on Vortex arrays. Read more
Source§fn take(&self) -> Option<&dyn TakeFn>
fn take(&self) -> Option<&dyn TakeFn>
Take a set of indices from an array. This often forces allocations and decoding of
the receiver. Read more
Source§fn and(&self) -> Option<&dyn AndFn>
fn and(&self) -> Option<&dyn AndFn>
Perform an Arrow-style boolean AND operation over two arrays Read more
Source§fn or(&self) -> Option<&dyn OrFn>
fn or(&self) -> Option<&dyn OrFn>
Perform an Arrow-style boolean OR operation over two arrays Read more
Source§fn cast(&self) -> Option<&dyn CastFn>
fn cast(&self) -> Option<&dyn CastFn>
Implemented for arrays that can be casted to different types. Read more
Source§fn compare(
&self,
_other: &Array,
_operator: Operator,
) -> Option<VortexResult<Array>>
fn compare( &self, _other: &Array, _operator: Operator, ) -> Option<VortexResult<Array>>
Binary operator implementation for arrays against other arrays. Read more
Source§fn filter(&self) -> Option<&dyn FilterFn>
fn filter(&self) -> Option<&dyn FilterFn>
Filtering function on arrays of predicates. Read more
Source§fn subtract_scalar(&self) -> Option<&dyn SubtractScalarFn>
fn subtract_scalar(&self) -> Option<&dyn SubtractScalarFn>
Broadcast subtraction of scalar from Vortex array. Read more
Source§fn search_sorted(&self) -> Option<&dyn SearchSortedFn>
fn search_sorted(&self) -> Option<&dyn SearchSortedFn>
Perform a search over an ordered array. Read more
Source§impl ArrayStatisticsCompute for BoolArray
impl ArrayStatisticsCompute for BoolArray
Source§fn compute_statistics(&self, stat: Stat) -> VortexResult<StatsSet>
fn compute_statistics(&self, stat: Stat) -> VortexResult<StatsSet>
Compute the requested statistic. Can return additional stats.
Source§impl ArrayTrait for BoolArray
impl ArrayTrait for BoolArray
Source§impl ArrayValidity for BoolArray
impl ArrayValidity for BoolArray
fn is_valid(&self, index: usize) -> bool
fn logical_validity(&self) -> LogicalValidity
Source§impl ArrayVariants for BoolArray
impl ArrayVariants for BoolArray
fn as_bool_array(&self) -> Option<&dyn BoolArrayTrait>
fn as_null_array(&self) -> Option<&dyn NullArrayTrait>
fn as_null_array_unchecked(&self) -> &dyn NullArrayTrait
fn as_bool_array_unchecked(&self) -> &dyn BoolArrayTrait
fn as_primitive_array(&self) -> Option<&dyn PrimitiveArrayTrait>
fn as_primitive_array_unchecked(&self) -> &dyn PrimitiveArrayTrait
fn as_utf8_array(&self) -> Option<&dyn Utf8ArrayTrait>
fn as_utf8_array_unchecked(&self) -> &dyn Utf8ArrayTrait
fn as_binary_array(&self) -> Option<&dyn BinaryArrayTrait>
fn as_binary_array_unchecked(&self) -> &dyn BinaryArrayTrait
fn as_struct_array(&self) -> Option<&dyn StructArrayTrait>
fn as_struct_array_unchecked(&self) -> &dyn StructArrayTrait
fn as_list_array(&self) -> Option<&dyn ListArrayTrait>
fn as_list_array_unchecked(&self) -> &dyn ListArrayTrait
fn as_extension_array(&self) -> Option<&dyn ExtensionArrayTrait>
fn as_extension_array_unchecked(&self) -> &dyn ExtensionArrayTrait
Source§impl BoolArrayTrait for BoolArray
impl BoolArrayTrait for BoolArray
Source§fn invert(&self) -> VortexResult<Array>
fn invert(&self) -> VortexResult<Array>
Return a new inverted version of this array. Read more
Source§fn maybe_null_indices_iter<'a>(&'a self) -> Box<dyn Iterator<Item = usize> + 'a>
fn maybe_null_indices_iter<'a>(&'a self) -> Box<dyn Iterator<Item = usize> + 'a>
An iterator over the sorted indices of set values in the underlying boolean array
good to array with low number of set values. Read more
Source§fn maybe_null_slices_iter<'a>(
&'a self,
) -> Box<dyn Iterator<Item = (usize, usize)> + 'a>
fn maybe_null_slices_iter<'a>( &'a self, ) -> Box<dyn Iterator<Item = (usize, usize)> + 'a>
An iterator over the sorted disjoint contiguous range of set values in the underlying boolean
array good for arrays with only long runs of set values. Read more
fn true_count(&self) -> usize
Source§impl FillForwardFn for BoolArray
impl FillForwardFn for BoolArray
fn fill_forward(&self) -> VortexResult<Array>
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 From<TypedArray<Bool>> for BoolArray
impl From<TypedArray<Bool>> for BoolArray
Source§fn from(typed: TypedArray<Bool>) -> Self
fn from(typed: TypedArray<Bool>) -> Self
Converts to this type from the input type.
Source§impl GetArrayMetadata for BoolArray
impl GetArrayMetadata for BoolArray
fn metadata(&self) -> Arc<dyn ArrayMetadata>
Source§impl IntoCanonical for BoolArray
impl IntoCanonical for BoolArray
fn into_canonical(self) -> VortexResult<Canonical>
Source§impl ScalarAtFn for BoolArray
impl ScalarAtFn 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 ArrayEncoding
Source§impl<T> ArrayStatistics for T
impl<T> ArrayStatistics for T
fn statistics(&self) -> &dyn Statistics
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
)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_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