Struct vortex_array::array::VarBinViewArray
source · pub struct VarBinViewArray(/* private fields */);
Implementations§
source§impl VarBinViewArray
impl VarBinViewArray
pub fn try_new( views: ArrayData, buffers: Vec<ArrayData>, dtype: DType, validity: Validity, ) -> VortexResult<Self>
sourcepub fn buffer_count(&self) -> usize
pub fn buffer_count(&self) -> usize
Number of raw string data buffers held by this array.
sourcepub fn binary_views(&self) -> VortexResult<Views>
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.
sourcepub fn view_at(&self, index: usize) -> VortexResult<BinaryView>
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
.
sourcepub fn views(&self) -> ArrayData
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 buffer
s OR an inlined copy of
the string (if the string has 12 bytes or fewer).
sourcepub fn buffer(&self, idx: usize) -> ArrayData
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.
sourcepub fn buffers(&self) -> Buffers<'_> ⓘ
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`
});
pub fn validity(&self) -> Validity
sourcepub fn from_iter<T: AsRef<[u8]>, I: IntoIterator<Item = Option<T>>>(
iter: I,
dtype: DType,
) -> Self
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.
pub fn from_iter_str<T: AsRef<str>, I: IntoIterator<Item = T>>(iter: I) -> Self
pub fn from_iter_nullable_str<T: AsRef<str>, I: IntoIterator<Item = Option<T>>>( iter: I, ) -> Self
pub fn from_iter_bin<T: AsRef<[u8]>, I: IntoIterator<Item = T>>(iter: I) -> Self
pub fn from_iter_nullable_bin<T: AsRef<[u8]>, I: IntoIterator<Item = Option<T>>>( iter: I, ) -> Self
pub fn bytes_at(&self, index: usize) -> VortexResult<Vec<u8>>
Trait Implementations§
source§impl ArrayAccessor<[u8]> for VarBinViewArray
impl ArrayAccessor<[u8]> for VarBinViewArray
source§impl AsRef<ArrayData> for VarBinViewArray
impl AsRef<ArrayData> for VarBinViewArray
source§impl Clone for VarBinViewArray
impl Clone for VarBinViewArray
source§fn clone(&self) -> VarBinViewArray
fn clone(&self) -> VarBinViewArray
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VarBinViewArray
impl Debug for VarBinViewArray
source§impl<'a> FromIterator<Option<&'a [u8]>> for VarBinViewArray
impl<'a> FromIterator<Option<&'a [u8]>> for VarBinViewArray
source§impl<'a> FromIterator<Option<&'a str>> for VarBinViewArray
impl<'a> FromIterator<Option<&'a str>> for VarBinViewArray
source§impl FromIterator<Option<String>> for VarBinViewArray
impl FromIterator<Option<String>> for VarBinViewArray
source§impl FromIterator<Option<Vec<u8>>> for VarBinViewArray
impl FromIterator<Option<Vec<u8>>> for VarBinViewArray
source§impl IntoArrayData for VarBinViewArray
impl IntoArrayData for VarBinViewArray
fn into_array(self) -> ArrayData
source§impl IntoCanonical for VarBinViewArray
impl IntoCanonical for VarBinViewArray
fn into_canonical(self) -> VortexResult<Canonical>
fn into_arrow(self) -> VortexResult<ArrayRef>where
Self: Sized,
source§impl ScalarAtFn<VarBinViewArray> for VarBinViewEncoding
impl ScalarAtFn<VarBinViewArray> for VarBinViewEncoding
fn scalar_at( &self, array: &VarBinViewArray, index: usize, ) -> VortexResult<Scalar>
source§impl SliceFn<VarBinViewArray> for VarBinViewEncoding
impl SliceFn<VarBinViewArray> for VarBinViewEncoding
source§fn slice(
&self,
array: &VarBinViewArray,
start: usize,
stop: usize,
) -> VortexResult<ArrayData>
fn slice( &self, array: &VarBinViewArray, start: usize, stop: usize, ) -> VortexResult<ArrayData>
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
impl StatisticsVTable<VarBinViewArray> for VarBinViewEncoding
source§fn compute_statistics(
&self,
array: &VarBinViewArray,
stat: Stat,
) -> VortexResult<StatsSet>
fn compute_statistics( &self, array: &VarBinViewArray, stat: Stat, ) -> VortexResult<StatsSet>
source§impl TakeFn<VarBinViewArray> for VarBinViewEncoding
impl TakeFn<VarBinViewArray> for VarBinViewEncoding
Take involves creating a new array that references the old array, just with the given set of views.
source§unsafe fn take_unchecked(
&self,
array: &VarBinViewArray,
indices: &ArrayData,
) -> VortexResult<ArrayData>
unsafe fn take_unchecked( &self, array: &VarBinViewArray, indices: &ArrayData, ) -> VortexResult<ArrayData>
source§impl<'a> TryFrom<&'a ArrayData> for &'a VarBinViewArray
impl<'a> TryFrom<&'a ArrayData> for &'a VarBinViewArray
source§impl TryFrom<ArrayData> for VarBinViewArray
impl TryFrom<ArrayData> for VarBinViewArray
source§impl ValidityVTable<VarBinViewArray> for VarBinViewEncoding
impl ValidityVTable<VarBinViewArray> for VarBinViewEncoding
fn is_valid(&self, array: &VarBinViewArray, index: usize) -> bool
fn logical_validity(&self, array: &VarBinViewArray) -> LogicalValidity
source§impl VariantsVTable<VarBinViewArray> for VarBinViewEncoding
impl VariantsVTable<VarBinViewArray> for VarBinViewEncoding
fn as_utf8_array<'a>( &self, array: &'a VarBinViewArray, ) -> Option<&'a dyn Utf8ArrayTrait>
fn as_binary_array<'a>( &self, array: &'a VarBinViewArray, ) -> Option<&'a dyn BinaryArrayTrait>
fn as_null_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn NullArrayTrait>
fn as_bool_array<'a>(&self, _array: &'a Array) -> Option<&'a dyn BoolArrayTrait>
fn as_primitive_array<'a>( &self, _array: &'a Array, ) -> Option<&'a dyn PrimitiveArrayTrait>
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<VarBinViewArray> for VarBinViewEncoding
impl VisitorVTable<VarBinViewArray> for VarBinViewEncoding
fn accept( &self, array: &VarBinViewArray, visitor: &mut dyn ArrayVisitor, ) -> VortexResult<()>
impl ArrayTrait for VarBinViewArray
impl BinaryArrayTrait for VarBinViewArray
impl Utf8ArrayTrait for VarBinViewArray
Auto Trait Implementations§
impl !Freeze for VarBinViewArray
impl !RefUnwindSafe for VarBinViewArray
impl Send for VarBinViewArray
impl Sync for VarBinViewArray
impl Unpin for VarBinViewArray
impl !UnwindSafe for VarBinViewArray
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
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)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 more