pub struct RunEndArray(/* private fields */);Implementations§
Source§impl RunEndArray
impl RunEndArray
Source§impl RunEndArray
impl RunEndArray
pub fn try_new(ends: Array, values: Array) -> VortexResult<Self>
Sourcepub fn find_physical_index(&self, index: usize) -> VortexResult<usize>
pub fn find_physical_index(&self, index: usize) -> VortexResult<usize>
Convert the given logical index to an index into the values array
Sourcepub fn find_physical_indices(
&self,
indices: &[usize],
) -> VortexResult<Buffer<u64>>
pub fn find_physical_indices( &self, indices: &[usize], ) -> VortexResult<Buffer<u64>>
Convert a batch of logical indices into an index for the values. Expects indices to be adjusted by offset unlike Self::find_physical_index
See: find_physical_index.
Sourcepub fn encode(array: Array) -> VortexResult<Self>
pub fn encode(array: Array) -> VortexResult<Self>
Run the array through run-end encoding.
Sourcepub fn offset(&self) -> usize
pub fn offset(&self) -> usize
The offset that the ends is relative to.
This is generally zero for a “new” array, and non-zero after a slicing operation.
Methods from Deref<Target = Array>§
Sourcepub fn encoding(&self) -> EncodingId
pub fn encoding(&self) -> EncodingId
Return the array’s encoding ID.
Sourcepub fn is_canonical(&self) -> bool
pub fn is_canonical(&self) -> bool
Whether the array is of a canonical encoding.
Sourcepub fn is_arrow(&self) -> bool
pub fn is_arrow(&self) -> bool
Whether the array is fully zero-copy to Arrow (including children). This means any nested types, like Structs, Lists, and Extensions are not present.
Sourcepub fn is_constant(&self) -> bool
pub fn is_constant(&self) -> bool
Return whether the array is constant.
Sourcepub fn as_constant(&self) -> Option<Scalar>
pub fn as_constant(&self) -> Option<Scalar>
Return scalar value of this array if the array is constant
pub fn child<'a>( &'a self, idx: usize, dtype: &'a DType, len: usize, ) -> Result<Array, VortexError>
Sourcepub fn children(&self) -> Vec<Array>
pub fn children(&self) -> Vec<Array>
Returns a Vec of Arrays with all the array’s child arrays.
Sourcepub fn named_children(&self) -> Vec<(String, Array)>
pub fn named_children(&self) -> Vec<(String, Array)>
Returns a Vec of Arrays with all the array’s child arrays.
pub fn depth_first_traversal(&self) -> ArrayChildrenIterator
Sourcepub fn cumulative_nbuffers(&self) -> usize
pub fn cumulative_nbuffers(&self) -> usize
Count the number of cumulative buffers encoded by self.
Sourcepub fn all_buffer_offsets(&self, alignment: usize) -> Vec<u64>
pub fn all_buffer_offsets(&self, alignment: usize) -> Vec<u64>
Return the buffer offsets and the total length of all buffers, assuming the given alignment. This includes all child buffers.
pub fn metadata_bytes(&self) -> Option<&[u8]>
pub fn nbuffers(&self) -> usize
pub fn byte_buffer(&self, index: usize) -> Option<&Buffer<u8>>
pub fn byte_buffers(&self) -> impl Iterator<Item = Buffer<u8>>
Sourcepub fn is_encoding(&self, id: EncodingId) -> bool
pub fn is_encoding(&self, id: EncodingId) -> bool
Checks whether array is of a given encoding.
pub fn try_downcast_ref<E>( &self, ) -> Result<(&<E as Encoding>::Array, &E), VortexError>
Sourcepub fn nbytes(&self) -> usize
pub fn nbytes(&self) -> usize
Total size of the array in bytes, including all children and buffers.
pub fn statistics(&self) -> &dyn Statistics
pub fn inherit_statistics(&self, parent: &dyn Statistics)
pub fn tree_display(&self) -> TreeDisplayWrapper<'_>
Sourcepub fn is_valid(&self, index: usize) -> Result<bool, VortexError>
pub fn is_valid(&self, index: usize) -> Result<bool, VortexError>
Return whether the element at the given index is valid (true) or null (false).
Sourcepub fn null_count(&self) -> Result<usize, VortexError>
pub fn null_count(&self) -> Result<usize, VortexError>
Return the number of null elements in the array.
Sourcepub fn logical_validity(&self) -> Result<Mask, VortexError>
pub fn logical_validity(&self) -> Result<Mask, VortexError>
Return the logical validity of the array if nullable, and None if non-nullable.
pub fn as_null_array(&self) -> Option<&dyn NullArrayTrait>
pub fn as_bool_array(&self) -> Option<&dyn BoolArrayTrait>
pub fn as_primitive_array( &self, ) -> Option<&dyn PrimitiveArrayTrait<Target = Array>>
pub fn as_utf8_array(&self) -> Option<&dyn Utf8ArrayTrait>
pub fn as_binary_array(&self) -> Option<&dyn BinaryArrayTrait>
pub fn as_struct_array(&self) -> Option<&dyn StructArrayTrait<Target = Array>>
pub fn as_list_array(&self) -> Option<&dyn ListArrayTrait>
pub fn as_extension_array( &self, ) -> Option<&dyn ExtensionArrayTrait<Target = Array>>
Trait Implementations§
Source§impl AsRef<Array> for RunEndArray
impl AsRef<Array> for RunEndArray
Source§impl BinaryNumericFn<RunEndArray> for RunEndEncoding
impl BinaryNumericFn<RunEndArray> for RunEndEncoding
fn binary_numeric( &self, array: &RunEndArray, rhs: &Array, op: BinaryNumericOperator, ) -> VortexResult<Option<Array>>
Source§impl CanonicalVTable<RunEndArray> for RunEndEncoding
impl CanonicalVTable<RunEndArray> for RunEndEncoding
fn into_canonical(&self, array: RunEndArray) -> VortexResult<Canonical>
Source§impl Clone for RunEndArray
impl Clone for RunEndArray
Source§fn clone(&self) -> RunEndArray
fn clone(&self) -> RunEndArray
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CompareFn<RunEndArray> for RunEndEncoding
impl CompareFn<RunEndArray> for RunEndEncoding
Source§fn compare(
&self,
lhs: &RunEndArray,
rhs: &Array,
operator: Operator,
) -> VortexResult<Option<Array>>
fn compare( &self, lhs: &RunEndArray, rhs: &Array, operator: Operator, ) -> VortexResult<Option<Array>>
Source§impl Debug for RunEndArray
impl Debug for RunEndArray
Source§impl Deref for RunEndArray
impl Deref for RunEndArray
Source§impl FillNullFn<RunEndArray> for RunEndEncoding
impl FillNullFn<RunEndArray> for RunEndEncoding
fn fill_null( &self, array: &RunEndArray, fill_value: Scalar, ) -> VortexResult<Array>
Source§impl FilterFn<RunEndArray> for RunEndEncoding
impl FilterFn<RunEndArray> for RunEndEncoding
Source§fn filter(&self, array: &RunEndArray, mask: &Mask) -> VortexResult<Array>
fn filter(&self, array: &RunEndArray, mask: &Mask) -> VortexResult<Array>
Source§impl IntoArray for RunEndArray
impl IntoArray for RunEndArray
fn into_array(self) -> Array
Source§impl InvertFn<RunEndArray> for RunEndEncoding
impl InvertFn<RunEndArray> for RunEndEncoding
Source§fn invert(&self, array: &RunEndArray) -> VortexResult<Array>
fn invert(&self, array: &RunEndArray) -> VortexResult<Array>
Source§impl PrimitiveArrayTrait for RunEndArray
impl PrimitiveArrayTrait for RunEndArray
Source§impl ScalarAtFn<RunEndArray> for RunEndEncoding
impl ScalarAtFn<RunEndArray> for RunEndEncoding
fn scalar_at(&self, array: &RunEndArray, index: usize) -> VortexResult<Scalar>
Source§impl SliceFn<RunEndArray> for RunEndEncoding
impl SliceFn<RunEndArray> for RunEndEncoding
Source§fn slice(
&self,
array: &RunEndArray,
start: usize,
stop: usize,
) -> VortexResult<Array>
fn slice( &self, array: &RunEndArray, start: usize, stop: usize, ) -> VortexResult<Array>
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<RunEndArray> for RunEndEncoding
impl StatisticsVTable<RunEndArray> for RunEndEncoding
Source§fn compute_statistics(
&self,
array: &RunEndArray,
stat: Stat,
) -> VortexResult<StatsSet>
fn compute_statistics( &self, array: &RunEndArray, stat: Stat, ) -> VortexResult<StatsSet>
Source§impl TakeFn<RunEndArray> for RunEndEncoding
impl TakeFn<RunEndArray> for RunEndEncoding
Source§fn take(&self, array: &RunEndArray, indices: &Array) -> VortexResult<Array>
fn take(&self, array: &RunEndArray, indices: &Array) -> VortexResult<Array>
Source§unsafe fn take_unchecked(
&self,
array: &A,
indices: &Array,
) -> Result<Array, VortexError>
unsafe fn take_unchecked( &self, array: &A, indices: &Array, ) -> Result<Array, VortexError>
Source§impl<'a> TryFrom<&'a Array> for &'a RunEndArray
impl<'a> TryFrom<&'a Array> for &'a RunEndArray
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(data: &'a Array) -> VortexResult<Self>
fn try_from(data: &'a Array) -> VortexResult<Self>
Source§impl TryFrom<Array> for RunEndArray
impl TryFrom<Array> for RunEndArray
Source§type Error = VortexError
type Error = VortexError
Source§fn try_from(data: Array) -> VortexResult<Self>
fn try_from(data: Array) -> VortexResult<Self>
Source§impl ValidateVTable<RunEndArray> for RunEndEncoding
impl ValidateVTable<RunEndArray> for RunEndEncoding
Source§impl ValidityVTable<RunEndArray> for RunEndEncoding
impl ValidityVTable<RunEndArray> for RunEndEncoding
Source§fn is_valid(&self, array: &RunEndArray, index: usize) -> VortexResult<bool>
fn is_valid(&self, array: &RunEndArray, index: usize) -> VortexResult<bool>
index item is valid.fn logical_validity(&self, array: &RunEndArray) -> VortexResult<Mask>
Source§fn null_count(&self, array: &Array) -> Result<usize, VortexError>
fn null_count(&self, array: &Array) -> Result<usize, VortexError>
Source§impl VariantsVTable<RunEndArray> for RunEndEncoding
impl VariantsVTable<RunEndArray> for RunEndEncoding
fn as_bool_array<'a>( &self, array: &'a RunEndArray, ) -> Option<&'a dyn BoolArrayTrait>
fn as_primitive_array<'a>( &self, array: &'a RunEndArray, ) -> Option<&'a dyn PrimitiveArrayTrait>
fn as_null_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn NullArrayTrait>
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<Target = Array>>
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<Target = Array>>
Source§impl VisitorVTable<RunEndArray> for RunEndEncoding
impl VisitorVTable<RunEndArray> for RunEndEncoding
fn accept( &self, array: &RunEndArray, visitor: &mut dyn ArrayVisitor, ) -> VortexResult<()>
impl BoolArrayTrait for RunEndArray
Auto Trait Implementations§
impl !Freeze for RunEndArray
impl !RefUnwindSafe for RunEndArray
impl Send for RunEndArray
impl Sync for RunEndArray
impl Unpin for RunEndArray
impl !UnwindSafe for RunEndArray
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<A> IntoCanonical for Awhere
A: IntoArray,
impl<A> IntoCanonical for Awhere
A: IntoArray,
Source§fn into_canonical(self) -> Result<Canonical, VortexError>
fn into_canonical(self) -> Result<Canonical, 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>
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>
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.