Struct vortex_array::array::VarBinViewArray

source ·
pub struct VarBinViewArray(/* private fields */);

Implementations§

source§

impl VarBinViewArray

source

pub fn maybe_from(data: impl AsRef<ArrayData>) -> Option<Self>

Optionally downcast an ArrayData instance to a specific encoding.

Preferred in cases where a backtrace isn’t needed, like when trying multiple encoding to go down different code paths.

source§

impl VarBinViewArray

source

pub fn try_new( views: ArrayData, buffers: Vec<ArrayData>, dtype: DType, validity: Validity, ) -> VortexResult<Self>

source

pub fn buffer_count(&self) -> usize

Number of raw string data buffers held by this array.

source

pub fn binary_views(&self) -> VortexResult<Views>

Access to the underlying views child array as a slice of BinaryView structures.

This is useful for iteration over the values, as well as for applying filters that may only require hitting the prefixes or inline strings.

source

pub fn view_at(&self, index: usize) -> VortexResult<BinaryView>

Retrieve a binary view at a specific index.

If you will be calling this method many times, it’s recommended that you instead use the iterator provided by binary_views.

source

pub fn views(&self) -> ArrayData

Access to the primitive views array.

Variable-sized binary view arrays contain a “view” child array, with 16-byte entries that contain either a pointer into one of the array’s owned buffers OR an inlined copy of the string (if the string has 12 bytes or fewer).

source

pub fn buffer(&self, idx: usize) -> ArrayData

Access one of the backing data buffers.

§Panics

This method panics if the provided index is out of bounds for the set of buffers provided at construction time.

source

pub fn buffers(&self) -> Buffers<'_>

Retrieve an iterator over the raw data buffers. These are the BYTE buffers that make up the array’s contents.

Example

use vortex_array::array::VarBinViewArray;
let array = VarBinViewArray::from_iter_str(["a", "b", "c"]);
array.buffers().for_each(|block| {
    // Do something with the `block`
});
source

pub fn validity(&self) -> Validity

source

pub fn from_iter<T: AsRef<[u8]>, I: IntoIterator<Item = Option<T>>>( iter: I, dtype: DType, ) -> Self

Accumulate an iterable set of values into our type here.

source

pub fn from_iter_str<T: AsRef<str>, I: IntoIterator<Item = T>>(iter: I) -> Self

source

pub fn from_iter_nullable_str<T: AsRef<str>, I: IntoIterator<Item = Option<T>>>( iter: I, ) -> Self

source

pub fn from_iter_bin<T: AsRef<[u8]>, I: IntoIterator<Item = T>>(iter: I) -> Self

source

pub fn from_iter_nullable_bin<T: AsRef<[u8]>, I: IntoIterator<Item = Option<T>>>( iter: I, ) -> Self

source

pub fn bytes_at(&self, index: usize) -> VortexResult<Vec<u8>>

Trait Implementations§

source§

impl ArrayAccessor<[u8]> for VarBinViewArray

source§

fn with_iterator<F: for<'a> FnOnce(&mut dyn Iterator<Item = Option<&'a [u8]>>) -> R, R>( &self, f: F, ) -> VortexResult<R>

Iterate over each element of the array, in-order. Read more
source§

impl AsRef<ArrayData> for VarBinViewArray

source§

fn as_ref(&self) -> &ArrayData

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for VarBinViewArray

source§

fn clone(&self) -> VarBinViewArray

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 VarBinViewArray

source§

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

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

impl<'a> FromIterator<Option<&'a [u8]>> for VarBinViewArray

source§

fn from_iter<T: IntoIterator<Item = Option<&'a [u8]>>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<'a> FromIterator<Option<&'a str>> for VarBinViewArray

source§

fn from_iter<T: IntoIterator<Item = Option<&'a str>>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl FromIterator<Option<String>> for VarBinViewArray

source§

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

Creates a value from an iterator. Read more
source§

impl FromIterator<Option<Vec<u8>>> for VarBinViewArray

source§

fn from_iter<T: IntoIterator<Item = Option<Vec<u8>>>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl IntoArrayData for VarBinViewArray

source§

impl IntoCanonical for VarBinViewArray

source§

fn into_canonical(self) -> VortexResult<Canonical>

source§

fn into_arrow(self) -> VortexResult<ArrayRef>
where Self: Sized,

source§

impl ScalarAtFn<VarBinViewArray> for VarBinViewEncoding

source§

fn scalar_at( &self, array: &VarBinViewArray, index: usize, ) -> VortexResult<Scalar>

source§

impl SliceFn<VarBinViewArray> for VarBinViewEncoding

source§

fn slice( &self, array: &VarBinViewArray, 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<VarBinViewArray> for VarBinViewEncoding

source§

fn compute_statistics( &self, array: &VarBinViewArray, stat: Stat, ) -> VortexResult<StatsSet>

Compute the requested statistic. Can return additional stats.
source§

impl TakeFn<VarBinViewArray> for VarBinViewEncoding

Take involves creating a new array that references the old array, just with the given set of views.

source§

fn take( &self, array: &VarBinViewArray, indices: &ArrayData, ) -> VortexResult<ArrayData>

Create a new array by taking the values from the array at the given indices. Read more
source§

unsafe fn take_unchecked( &self, array: &VarBinViewArray, indices: &ArrayData, ) -> VortexResult<ArrayData>

Create a new array by taking the values from the array at the given indices. Read more
source§

impl<'a> TryFrom<&'a ArrayData> for &'a VarBinViewArray

source§

type Error = VortexError

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

fn try_from(data: &'a ArrayData) -> VortexResult<Self>

Performs the conversion.
source§

impl TryFrom<ArrayData> for VarBinViewArray

source§

type Error = VortexError

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

fn try_from(data: ArrayData) -> VortexResult<Self>

Performs the conversion.
source§

impl ValidityVTable<VarBinViewArray> for VarBinViewEncoding

source§

impl VariantsVTable<VarBinViewArray> for VarBinViewEncoding

source§

fn as_utf8_array<'a>( &self, array: &'a VarBinViewArray, ) -> Option<&'a dyn Utf8ArrayTrait>

source§

fn as_binary_array<'a>( &self, array: &'a VarBinViewArray, ) -> Option<&'a dyn BinaryArrayTrait>

source§

fn as_null_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn NullArrayTrait>

source§

fn as_bool_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn BoolArrayTrait>

source§

fn as_primitive_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn PrimitiveArrayTrait>

source§

fn as_struct_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn StructArrayTrait>

source§

fn as_list_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn ListArrayTrait>

source§

fn as_extension_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn ExtensionArrayTrait>

source§

impl VisitorVTable<VarBinViewArray> for VarBinViewEncoding

source§

fn accept( &self, array: &VarBinViewArray, visitor: &mut dyn ArrayVisitor, ) -> VortexResult<()>

source§

impl ArrayTrait for VarBinViewArray

source§

impl BinaryArrayTrait for VarBinViewArray

source§

impl Utf8ArrayTrait for VarBinViewArray

Auto Trait Implementations§

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: AsRef<ArrayData>,

source§

fn dtype(&self) -> &DType

source§

impl<T> ArrayEncodingRef for T
where T: AsRef<ArrayData>,

source§

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

source§

impl<T> ArrayLen for T
where T: AsRef<ArrayData>,

source§

fn len(&self) -> usize

source§

fn is_empty(&self) -> bool

source§

impl<A> ArrayNBytes for A
where A: AsRef<ArrayData>,

source§

fn nbytes(&self) -> usize

Total size of the array in bytes, including all children and buffers.
source§

impl<T> ArrayStatistics for T
where T: AsRef<ArrayData>,

source§

fn statistics(&self) -> &dyn Statistics

source§

fn inherit_statistics(&self, parent: &dyn Statistics)

source§

impl<A> ArrayValidity for A
where A: AsRef<ArrayData>,

source§

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

Return the logical validity of the array.

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§

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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§

fn into_null(self) -> Result<NullArray, VortexError>

source§

fn into_bool(self) -> Result<BoolArray, VortexError>

source§

fn into_primitive(self) -> Result<PrimitiveArray, VortexError>

source§

fn into_struct(self) -> Result<StructArray, VortexError>

source§

fn into_list(self) -> Result<ListArray, VortexError>

source§

fn into_varbinview(self) -> Result<VarBinViewArray, VortexError>

source§

fn into_extension(self) -> Result<ExtensionArray, VortexError>

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<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<A> ToArrayData for A
where A: AsRef<ArrayData>,

source§

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

source§

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, U> TryFrom<U> for T
where U: Into<T>,

source§

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>,

source§

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> Ungil for T
where T: Send,