Struct vortex::array::SparseArray
source · pub struct SparseArray { /* private fields */ }
Implementations§
source§impl SparseArray
impl SparseArray
source§impl SparseArray
impl SparseArray
source§impl SparseArray
impl SparseArray
pub fn indices_offset(&self) -> usize
pub fn values(&self) -> Array
pub fn indices(&self) -> Array
pub fn fill_value(&self) -> &Scalar
sourcepub fn find_index(&self, index: usize) -> VortexResult<Option<usize>>
pub fn find_index(&self, index: usize) -> VortexResult<Option<usize>>
Returns the position of a given index in the indices array if it exists.
sourcepub fn resolved_indices(&self) -> Vec<usize>
pub fn resolved_indices(&self) -> Vec<usize>
Return indices as a vector of usize with the indices_offset applied.
pub fn min_index(&self) -> usize
Trait Implementations§
source§impl AcceptArrayVisitor for SparseArray
impl AcceptArrayVisitor for SparseArray
fn accept(&self, visitor: &mut dyn ArrayVisitor) -> VortexResult<()>
source§impl ArrayCompute for SparseArray
impl ArrayCompute for SparseArray
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 search_sorted(&self) -> Option<&dyn SearchSortedFn>
fn search_sorted(&self) -> Option<&dyn SearchSortedFn>
Perform a search over an ordered array. 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 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) -> Option<&dyn CompareFn>
fn compare(&self) -> Option<&dyn CompareFn>
Binary operator implementation for arrays against other arrays. Read more
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 filter(&self) -> Option<&dyn FilterFn>
fn filter(&self) -> Option<&dyn FilterFn>
Filtering function on arrays of predicates. Read more
source§fn filter_indices(&self) -> Option<&dyn FilterIndicesFn>
fn filter_indices(&self) -> Option<&dyn FilterIndicesFn>
Filter indices based on a disjunctive normal form relational expression.
TODO(aduffy): remove this function and push implementation into vortex-datafusion.
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§impl ArrayStatisticsCompute for SparseArray
impl ArrayStatisticsCompute for SparseArray
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 SparseArray
impl ArrayTrait for SparseArray
source§impl ArrayValidity for SparseArray
impl ArrayValidity for SparseArray
fn is_valid(&self, index: usize) -> bool
fn logical_validity(&self) -> LogicalValidity
source§impl ArrayVariants for SparseArray
impl ArrayVariants for SparseArray
Sparse arrays support all DTypes
fn as_null_array(&self) -> Option<&dyn NullArrayTrait>
fn as_bool_array(&self) -> Option<&dyn BoolArrayTrait>
fn as_primitive_array(&self) -> Option<&dyn PrimitiveArrayTrait>
fn as_utf8_array(&self) -> Option<&dyn Utf8ArrayTrait>
fn as_binary_array(&self) -> Option<&dyn BinaryArrayTrait>
fn as_struct_array(&self) -> Option<&dyn StructArrayTrait>
fn as_list_array(&self) -> Option<&dyn ListArrayTrait>
fn as_extension_array(&self) -> Option<&dyn ExtensionArrayTrait>
fn as_null_array_unchecked(&self) -> &dyn NullArrayTrait
fn as_bool_array_unchecked(&self) -> &dyn BoolArrayTrait
fn as_primitive_array_unchecked(&self) -> &dyn PrimitiveArrayTrait
fn as_utf8_array_unchecked(&self) -> &dyn Utf8ArrayTrait
fn as_binary_array_unchecked(&self) -> &dyn BinaryArrayTrait
fn as_struct_array_unchecked(&self) -> &dyn StructArrayTrait
fn as_list_array_unchecked(&self) -> &dyn ListArrayTrait
fn as_extension_array_unchecked(&self) -> &dyn ExtensionArrayTrait
source§impl AsArray for SparseArray
impl AsArray for SparseArray
fn as_array_ref(&self) -> &Array
source§impl BoolArrayTrait for SparseArray
impl BoolArrayTrait for SparseArray
source§impl Clone for SparseArray
impl Clone for SparseArray
source§fn clone(&self) -> SparseArray
fn clone(&self) -> SparseArray
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SparseArray
impl Debug for SparseArray
source§impl From<SparseArray> for Array
impl From<SparseArray> for Array
source§fn from(value: SparseArray) -> Array
fn from(value: SparseArray) -> Array
Converts to this type from the input type.
source§impl From<TypedArray<Sparse>> for SparseArray
impl From<TypedArray<Sparse>> for SparseArray
source§fn from(typed: TypedArray<Sparse>) -> Self
fn from(typed: TypedArray<Sparse>) -> Self
Converts to this type from the input type.
source§impl GetArrayMetadata for SparseArray
impl GetArrayMetadata for SparseArray
fn metadata(&self) -> Arc<dyn ArrayMetadata>
source§impl<'a> IntoArray for SparseArray
impl<'a> IntoArray for SparseArray
fn into_array(self) -> Array
source§impl IntoCanonical for SparseArray
impl IntoCanonical for SparseArray
fn into_canonical(self) -> VortexResult<Canonical>
source§impl ScalarAtFn for SparseArray
impl ScalarAtFn for SparseArray
source§impl SearchSortedFn for SparseArray
impl SearchSortedFn for SparseArray
fn search_sorted( &self, value: &Scalar, side: SearchSortedSide, ) -> VortexResult<SearchResult>
source§impl SliceFn for SparseArray
impl SliceFn for SparseArray
source§impl StructArrayTrait for SparseArray
impl StructArrayTrait for SparseArray
source§impl TakeFn for SparseArray
impl TakeFn for SparseArray
source§impl TryFrom<&Array> for SparseArray
impl TryFrom<&Array> for SparseArray
source§impl TryFrom<Array> for SparseArray
impl TryFrom<Array> for SparseArray
impl BinaryArrayTrait for SparseArray
impl ExtensionArrayTrait for SparseArray
impl ListArrayTrait for SparseArray
impl NullArrayTrait for SparseArray
impl PrimitiveArrayTrait for SparseArray
impl Utf8ArrayTrait for SparseArray
Auto Trait Implementations§
impl !Freeze for SparseArray
impl !RefUnwindSafe for SparseArray
impl Send for SparseArray
impl Sync for SparseArray
impl Unpin for SparseArray
impl !UnwindSafe for SparseArray
Blanket Implementations§
source§impl<T> ArrayEncodingRef for Twhere
T: AsArray,
impl<T> ArrayEncodingRef for Twhere
T: AsArray,
fn encoding(&self) -> &'static dyn ArrayEncoding
source§impl<T> ArrayStatistics for Twhere
T: AsArray,
impl<T> ArrayStatistics for Twhere
T: AsArray,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default 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_varbin(self) -> Result<VarBinArray, 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