pub struct RunEndArray(/* private fields */);Implementations§
Source§impl RunEndArray
impl RunEndArray
Source§impl RunEndArray
impl RunEndArray
pub fn try_new(ends: ArrayData, values: ArrayData) -> 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: ArrayData) -> VortexResult<Self>
pub fn encode(array: ArrayData) -> 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.
Trait Implementations§
Source§impl AsRef<ArrayData> for RunEndArray
impl AsRef<ArrayData> for RunEndArray
Source§impl BinaryNumericFn<RunEndArray> for RunEndEncoding
impl BinaryNumericFn<RunEndArray> for RunEndEncoding
fn binary_numeric( &self, array: &RunEndArray, rhs: &ArrayData, op: BinaryNumericOperator, ) -> VortexResult<Option<ArrayData>>
Source§impl Clone for RunEndArray
impl Clone for RunEndArray
Source§fn clone(&self) -> RunEndArray
fn clone(&self) -> RunEndArray
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 CompareFn<RunEndArray> for RunEndEncoding
impl CompareFn<RunEndArray> for RunEndEncoding
Source§fn compare(
&self,
lhs: &RunEndArray,
rhs: &ArrayData,
operator: Operator,
) -> VortexResult<Option<ArrayData>>
fn compare( &self, lhs: &RunEndArray, rhs: &ArrayData, operator: Operator, ) -> VortexResult<Option<ArrayData>>
Compares two arrays and returns a new boolean array with the result of the comparison.
Or, returns None if comparison is not supported for these arrays.
Source§impl Debug for RunEndArray
impl Debug for RunEndArray
Source§impl FillNullFn<RunEndArray> for RunEndEncoding
impl FillNullFn<RunEndArray> for RunEndEncoding
fn fill_null( &self, array: &RunEndArray, fill_value: Scalar, ) -> VortexResult<ArrayData>
Source§impl FilterFn<RunEndArray> for RunEndEncoding
impl FilterFn<RunEndArray> for RunEndEncoding
Source§fn filter(
&self,
array: &RunEndArray,
mask: &FilterMask,
) -> VortexResult<ArrayData>
fn filter( &self, array: &RunEndArray, mask: &FilterMask, ) -> VortexResult<ArrayData>
Filter an array by the provided predicate.
Source§impl IntoArrayData for RunEndArray
impl IntoArrayData for RunEndArray
fn into_array(self) -> ArrayData
Source§impl IntoCanonical for RunEndArray
impl IntoCanonical for RunEndArray
fn into_canonical(self) -> VortexResult<Canonical>
fn into_arrow(self) -> Result<Arc<dyn Array>, VortexError>where
Self: Sized,
fn into_arrow_with_data_type(
self,
data_type: &DataType,
) -> Result<Arc<dyn Array>, VortexError>where
Self: Sized,
Source§impl InvertFn<RunEndArray> for RunEndEncoding
impl InvertFn<RunEndArray> for RunEndEncoding
Source§fn invert(&self, array: &RunEndArray) -> VortexResult<ArrayData>
fn invert(&self, array: &RunEndArray) -> VortexResult<ArrayData>
Logically invert a boolean array. Converts true -> false, false -> true, null -> null.
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<ArrayData>
fn slice( &self, array: &RunEndArray, 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<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>
Compute the requested statistic. Can return additional stats.
Source§impl TakeFn<RunEndArray> for RunEndEncoding
impl TakeFn<RunEndArray> for RunEndEncoding
Source§fn take(
&self,
array: &RunEndArray,
indices: &ArrayData,
) -> VortexResult<ArrayData>
fn take( &self, array: &RunEndArray, indices: &ArrayData, ) -> VortexResult<ArrayData>
Source§unsafe fn take_unchecked(
&self,
array: &Array,
indices: &ArrayData,
) -> Result<ArrayData, VortexError>
unsafe fn take_unchecked( &self, array: &Array, indices: &ArrayData, ) -> Result<ArrayData, VortexError>
Source§impl<'a> TryFrom<&'a ArrayData> for &'a RunEndArray
impl<'a> TryFrom<&'a ArrayData> for &'a RunEndArray
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§fn try_from(data: &'a ArrayData) -> VortexResult<Self>
fn try_from(data: &'a ArrayData) -> VortexResult<Self>
Performs the conversion.
Source§impl TryFrom<ArrayData> for RunEndArray
impl TryFrom<ArrayData> for RunEndArray
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§fn try_from(data: ArrayData) -> VortexResult<Self>
fn try_from(data: ArrayData) -> VortexResult<Self>
Performs the conversion.
Source§impl ValidateVTable<RunEndArray> for RunEndEncoding
impl ValidateVTable<RunEndArray> for RunEndEncoding
Source§impl ValidityVTable<RunEndArray> for RunEndEncoding
impl ValidityVTable<RunEndArray> for RunEndEncoding
fn is_valid(&self, array: &RunEndArray, index: usize) -> bool
fn logical_validity(&self, array: &RunEndArray) -> LogicalValidity
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>
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<RunEndArray> for RunEndEncoding
impl VisitorVTable<RunEndArray> for RunEndEncoding
fn accept( &self, array: &RunEndArray, visitor: &mut dyn ArrayVisitor, ) -> VortexResult<()>
impl ArrayTrait for RunEndArray
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> 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§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