pub struct ConstantArray { /* private fields */ }
Implementations§
Source§impl ConstantArray
impl ConstantArray
pub fn new<S>(scalar: S, length: usize) -> Self
pub fn scalar_value(&self) -> &ScalarValue
Sourcepub fn owned_scalar(&self) -> Scalar
pub fn owned_scalar(&self) -> Scalar
Construct an owned vortex_scalar::Scalar
with a value equal to Self::scalar_value()
.
Trait Implementations§
Source§impl AcceptArrayVisitor for ConstantArray
impl AcceptArrayVisitor for ConstantArray
fn accept(&self, _visitor: &mut dyn ArrayVisitor) -> VortexResult<()>
Source§impl<T> Accessor<T> for ConstantArray
impl<T> Accessor<T> for ConstantArray
Source§impl AndFn for ConstantArray
impl AndFn for ConstantArray
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 ArrayCompute for ConstantArray
impl ArrayCompute for ConstantArray
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 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 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 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 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 ConstantArray
impl ArrayStatisticsCompute for ConstantArray
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 ConstantArray
impl ArrayTrait for ConstantArray
Source§impl ArrayValidity for ConstantArray
impl ArrayValidity for ConstantArray
fn is_valid(&self, _index: usize) -> bool
fn logical_validity(&self) -> LogicalValidity
Source§impl ArrayVariants for ConstantArray
impl ArrayVariants for ConstantArray
Constant 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 AsRef<Array> for ConstantArray
impl AsRef<Array> for ConstantArray
Source§impl BoolArrayTrait for ConstantArray
impl BoolArrayTrait for ConstantArray
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(&self) -> Box<dyn Iterator<Item = usize>>
fn maybe_null_indices_iter(&self) -> Box<dyn Iterator<Item = usize>>
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(&self) -> Box<dyn Iterator<Item = (usize, usize)>>
fn maybe_null_slices_iter(&self) -> Box<dyn Iterator<Item = (usize, usize)>>
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 Clone for ConstantArray
impl Clone for ConstantArray
Source§fn clone(&self) -> ConstantArray
fn clone(&self) -> ConstantArray
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 ConstantArray
impl Debug for ConstantArray
Source§impl ExtensionArrayTrait for ConstantArray
impl ExtensionArrayTrait for ConstantArray
Source§impl FilterFn for ConstantArray
impl FilterFn for ConstantArray
Source§impl From<ConstantArray> for Array
impl From<ConstantArray> for Array
Source§fn from(value: ConstantArray) -> Array
fn from(value: ConstantArray) -> Array
Converts to this type from the input type.
Source§impl From<TypedArray<Constant>> for ConstantArray
impl From<TypedArray<Constant>> for ConstantArray
Source§fn from(typed: TypedArray<Constant>) -> Self
fn from(typed: TypedArray<Constant>) -> Self
Converts to this type from the input type.
Source§impl GetArrayMetadata for ConstantArray
impl GetArrayMetadata for ConstantArray
fn metadata(&self) -> Arc<dyn ArrayMetadata>
Source§impl IntoArray for ConstantArray
impl IntoArray for ConstantArray
fn into_array(self) -> Array
Source§impl IntoCanonical for ConstantArray
impl IntoCanonical for ConstantArray
fn into_canonical(self) -> VortexResult<Canonical>
Source§impl MaybeCompareFn for ConstantArray
impl MaybeCompareFn for ConstantArray
fn maybe_compare( &self, other: &Array, operator: Operator, ) -> Option<VortexResult<Array>>
Source§impl OrFn for ConstantArray
impl OrFn for ConstantArray
Source§impl PrimitiveArrayTrait for ConstantArray
impl PrimitiveArrayTrait for ConstantArray
fn f32_accessor(&self) -> Option<AccessorRef<f32>>
fn f64_accessor(&self) -> Option<AccessorRef<f64>>
fn u8_accessor(&self) -> Option<AccessorRef<u8>>
fn u16_accessor(&self) -> Option<AccessorRef<u16>>
fn u32_accessor(&self) -> Option<AccessorRef<u32>>
fn u64_accessor(&self) -> Option<AccessorRef<u64>>
fn i8_accessor(&self) -> Option<AccessorRef<i8>>
fn i16_accessor(&self) -> Option<AccessorRef<i16>>
fn i32_accessor(&self) -> Option<AccessorRef<i32>>
fn i64_accessor(&self) -> Option<AccessorRef<i64>>
fn ptype(&self) -> PType
fn f16_accessor(&self) -> Option<AccessorRef<f16>>
fn u8_iter(&self) -> Option<VectorizedArrayIter<u8>>
fn u16_iter(&self) -> Option<VectorizedArrayIter<u16>>
fn u32_iter(&self) -> Option<VectorizedArrayIter<u32>>
fn u64_iter(&self) -> Option<VectorizedArrayIter<u64>>
fn i8_iter(&self) -> Option<VectorizedArrayIter<i8>>
fn i16_iter(&self) -> Option<VectorizedArrayIter<i16>>
fn i32_iter(&self) -> Option<VectorizedArrayIter<i32>>
fn i64_iter(&self) -> Option<VectorizedArrayIter<i64>>
fn f16_iter(&self) -> Option<VectorizedArrayIter<f16>>
fn f32_iter(&self) -> Option<VectorizedArrayIter<f32>>
fn f64_iter(&self) -> Option<VectorizedArrayIter<f64>>
Source§impl ScalarAtFn for ConstantArray
impl ScalarAtFn for ConstantArray
Source§impl SearchSortedFn for ConstantArray
impl SearchSortedFn for ConstantArray
fn search_sorted( &self, value: &Scalar, side: SearchSortedSide, ) -> VortexResult<SearchResult>
fn search_sorted_u64( &self, value: u64, side: SearchSortedSide, ) -> VortexResult<SearchResult>
Source§fn search_sorted_many(
&self,
values: &[Scalar],
sides: &[SearchSortedSide],
) -> VortexResult<Vec<SearchResult>>
fn search_sorted_many( &self, values: &[Scalar], sides: &[SearchSortedSide], ) -> VortexResult<Vec<SearchResult>>
Bulk search for many values.
fn search_sorted_u64_many( &self, values: &[u64], sides: &[SearchSortedSide], ) -> VortexResult<Vec<SearchResult>>
Source§impl SliceFn for ConstantArray
impl SliceFn for ConstantArray
Source§impl StructArrayTrait for ConstantArray
impl StructArrayTrait for ConstantArray
Source§impl TakeFn for ConstantArray
impl TakeFn for ConstantArray
Source§impl TryFrom<&Array> for ConstantArray
impl TryFrom<&Array> for ConstantArray
Source§impl TryFrom<Array> for ConstantArray
impl TryFrom<Array> for ConstantArray
impl BinaryArrayTrait for ConstantArray
impl ListArrayTrait for ConstantArray
impl NullArrayTrait for ConstantArray
impl Utf8ArrayTrait for ConstantArray
Auto Trait Implementations§
impl !Freeze for ConstantArray
impl !RefUnwindSafe for ConstantArray
impl Send for ConstantArray
impl Sync for ConstantArray
impl Unpin for ConstantArray
impl !UnwindSafe for ConstantArray
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