Enum vortex::Array

source ·
pub enum Array {
    Data(ArrayData),
    View(ArrayView),
}

Variants§

Implementations§

source§

impl Array

source§

impl Array

source

pub fn tree_display(&self) -> TreeDisplayWrapper<'_>

source§

impl Array

source

pub fn encoding(&self) -> EncodingRef

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn nbytes(&self) -> usize

source

pub fn child<'a>( &'a self, idx: usize, dtype: &'a DType, len: usize, ) -> Option<Self>

source

pub fn children(&self) -> Vec<Array>

source

pub fn nchildren(&self) -> usize

source

pub fn depth_first_traversal(&self) -> ArrayChildrenIterator

source

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.

source

pub fn buffer(&self) -> Option<&Buffer>

source

pub fn into_buffer(self) -> Option<Buffer>

source

pub fn into_array_iterator(self) -> impl ArrayIterator

source

pub fn into_array_stream(self) -> impl ArrayStream

source§

impl Array

source

pub fn with_dyn<R, F>(&self, f: F) -> R
where F: FnMut(&dyn ArrayTrait) -> R,

Trait Implementations§

source§

impl AsArray for Array

source§

impl Clone for Array

source§

fn clone(&self) -> Array

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Array

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Array

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Array> for ArrayData

source§

fn from(value: Array) -> ArrayData

Converts to this type from the input type.
source§

impl From<Array> for RecordBatch

source§

fn from(value: Array) -> Self

Converts to this type from the input type.
source§

impl From<ArrayData> for Array

source§

fn from(value: ArrayData) -> Array

Converts to this type from the input type.
source§

impl From<BoolArray> for Array

source§

fn from(value: BoolArray) -> Array

Converts to this type from the input type.
source§

impl From<Canonical> for Array

This conversion is always “free” and should not touch underlying data. All it does is create an owned pointer to the underlying concrete array type.

This combined with the above IntoCanonical impl for Array allows simple two-way conversions between arbitrary Vortex encodings and canonical Arrow-compatible encodings.

source§

fn from(value: Canonical) -> Self

Converts to this type from the input type.
source§

impl From<ChunkedArray> for Array

source§

fn from(value: ChunkedArray) -> Array

Converts to this type from the input type.
source§

impl From<ConstantArray> for Array

source§

fn from(value: ConstantArray) -> Array

Converts to this type from the input type.
source§

impl From<ExtensionArray> for Array

source§

fn from(value: ExtensionArray) -> Array

Converts to this type from the input type.
source§

impl From<NullArray> for Array

source§

fn from(value: NullArray) -> Array

Converts to this type from the input type.
source§

impl From<PrimitiveArray> for Array

source§

fn from(value: PrimitiveArray) -> Array

Converts to this type from the input type.
source§

impl From<RecordBatch> for Array

source§

fn from(value: RecordBatch) -> Self

Converts to this type from the input type.
source§

impl From<SparseArray> for Array

source§

fn from(value: SparseArray) -> Array

Converts to this type from the input type.
source§

impl From<StructArray> for Array

source§

fn from(value: StructArray) -> Array

Converts to this type from the input type.
source§

impl From<TemporalArray> for Array

source§

fn from(value: TemporalArray) -> Self

Converts to this type from the input type.
source§

impl From<VarBinArray> for Array

source§

fn from(value: VarBinArray) -> Array

Converts to this type from the input type.
source§

impl From<VarBinViewArray> for Array

source§

fn from(value: VarBinViewArray) -> Array

Converts to this type from the input type.
source§

impl FromArrowArray<&BooleanArray> for Array

source§

fn from_arrow(value: &ArrowBooleanArray, nullable: bool) -> Self

source§

impl<T: ByteArrayType> FromArrowArray<&GenericByteArray<T>> for Array

source§

fn from_arrow(value: &GenericByteArray<T>, nullable: bool) -> Self

source§

impl<T: ByteViewType> FromArrowArray<&GenericByteViewArray<T>> for Array

source§

fn from_arrow(value: &GenericByteViewArray<T>, nullable: bool) -> Self

source§

impl FromArrowArray<&NullArray> for Array

source§

fn from_arrow(value: &ArrowNullArray, nullable: bool) -> Self

source§

impl<T: ArrowPrimitiveType> FromArrowArray<&PrimitiveArray<T>> for Array

source§

fn from_arrow(value: &ArrowPrimitiveArray<T>, nullable: bool) -> Self

source§

impl FromArrowArray<&StructArray> for Array

source§

fn from_arrow(value: &ArrowStructArray, nullable: bool) -> Self

source§

impl FromArrowArray<Arc<dyn Array>> for Array

source§

fn from_arrow(array: ArrowArrayRef, nullable: bool) -> Self

source§

impl FromIterator<Array> for ChunkedArray

source§

fn from_iter<T: IntoIterator<Item = Array>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl IndexOrd<Scalar> for Array

source§

fn index_cmp(&self, idx: usize, elem: &Scalar) -> Option<Ordering>

source§

fn index_lt(&self, idx: usize, elem: &V) -> bool

source§

fn index_le(&self, idx: usize, elem: &V) -> bool

source§

fn index_gt(&self, idx: usize, elem: &V) -> bool

source§

fn index_ge(&self, idx: usize, elem: &V) -> bool

source§

impl IntoCanonical for Array

IntoCanonical implementation for Array.

Canonicalizing an array requires potentially decompressing, so this requires a roundtrip through the array’s internal codec.

source§

impl Len for Array

source§

fn len(&self) -> usize

source§

impl TryFrom<&Array> for BoolArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for ChunkedArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for ConstantArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for ExtensionArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for NullArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for PrimitiveArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for SparseArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for StructArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for TemporalArray

source§

fn try_from(value: &Array) -> Result<Self, Self::Error>

Try to specialize a generic Vortex array as a TemporalArray.

§Errors

If the provided Array does not have vortex.ext encoding, an error will be returned.

If the provided Array does not have recognized ExtMetadata corresponding to one of the known TemporalMetadata variants, an error is returned.

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

impl<'a, D: ArrayDef> TryFrom<&'a Array> for TypedArray<D>

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(value: &'a Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for VarBinArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<&Array> for VarBinViewArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: &Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for BoolArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for ChunkedArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for ConstantArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for ExtensionArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for NullArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for PrimitiveArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for SparseArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for StructArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for TemporalArray

source§

fn try_from(value: Array) -> Result<Self, Self::Error>

Try to specialize a generic Vortex array as a TemporalArray.

Delegates to TryFrom<&Array>.

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

impl<D: ArrayDef> TryFrom<Array> for TypedArray<D>

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for VarBinArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<Array> for VarBinViewArray

§

type Error = VortexError

The type returned in the event of a conversion error.
source§

fn try_from(array: Array) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

§

impl !Freeze for Array

§

impl !RefUnwindSafe for Array

§

impl Send for Array

§

impl Sync for Array

§

impl Unpin for Array

§

impl !UnwindSafe for Array

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> ArrayDType for T
where T: AsArray,

source§

fn dtype(&self) -> &DType

source§

impl<T> ArrayEncodingRef for T
where T: AsArray,

source§

fn encoding(&self) -> &'static dyn ArrayEncoding

source§

impl<T> ArrayLen for T
where T: AsArray,

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

impl<T> ArrayStatistics for T
where T: AsArray,

source§

fn statistics(&self) -> &dyn Statistics

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoArrayVariant for T
where T: IntoCanonical,

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<S, T> SearchSorted<T> for S
where S: IndexOrd<T> + Len + ?Sized,

source§

fn search_sorted_by<F, N>( &self, find: F, side_find: N, side: SearchSortedSide, ) -> SearchResult
where F: FnMut(usize) -> Ordering, N: FnMut(usize) -> Ordering,

find function is used to find the element if it exists, if element exists side_find will be used to find desired index amongst equal values
source§

fn search_sorted(&self, value: &T, side: SearchSortedSide) -> SearchResult
where Self: IndexOrd<T>,

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.