Struct vortex_array::array::VarBinArray
source · pub struct VarBinArray(/* private fields */);
Implementations§
source§impl VarBinArray
impl VarBinArray
source§impl VarBinArray
impl VarBinArray
pub fn try_new( offsets: ArrayData, bytes: ArrayData, dtype: DType, validity: Validity, ) -> VortexResult<Self>
pub fn offsets(&self) -> ArrayData
pub fn first_offset<T: NativePType + for<'a> TryFrom<&'a Scalar, Error = VortexError>>( &self, ) -> VortexResult<T>
sourcepub fn bytes(&self) -> ArrayData
pub fn bytes(&self) -> ArrayData
Access the value bytes child array
§Note
Bytes child array is never sliced when the array is sliced so this can include values that are not logically present in the array. Users should prefer sliced_bytes unless they’re resolving values via offset child array.
pub fn validity(&self) -> Validity
sourcepub fn sliced_bytes(&self) -> VortexResult<ArrayData>
pub fn sliced_bytes(&self) -> VortexResult<ArrayData>
Access value bytes child array limited to values that are logically present in the array unlike bytes.
pub fn from_vec<T: AsRef<[u8]>>(vec: Vec<T>, dtype: DType) -> Self
pub fn from_iter<T: AsRef<[u8]>, I: IntoIterator<Item = Option<T>>>( iter: I, dtype: DType, ) -> Self
pub fn from_iter_nonnull<T: AsRef<[u8]>, I: IntoIterator<Item = T>>( iter: I, dtype: DType, ) -> Self
pub fn offset_at(&self, index: usize) -> usize
pub fn bytes_at(&self, index: usize) -> VortexResult<Buffer>
sourcepub fn into_parts(self) -> (DType, ArrayData, ArrayData, Validity)
pub fn into_parts(self) -> (DType, ArrayData, ArrayData, Validity)
Consumes self, returning a tuple containing the DType
, the bytes
array,
the offsets
array, and the validity
.
Trait Implementations§
source§impl ArrayAccessor<[u8]> for VarBinArray
impl ArrayAccessor<[u8]> for VarBinArray
source§impl AsRef<ArrayData> for VarBinArray
impl AsRef<ArrayData> for VarBinArray
source§impl Clone for VarBinArray
impl Clone for VarBinArray
source§fn clone(&self) -> VarBinArray
fn clone(&self) -> VarBinArray
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<VarBinArray> for VarBinEncoding
impl CompareFn<VarBinArray> for VarBinEncoding
source§impl Debug for VarBinArray
impl Debug for VarBinArray
source§impl FilterFn<VarBinArray> for VarBinEncoding
impl FilterFn<VarBinArray> for VarBinEncoding
source§fn filter(
&self,
array: &VarBinArray,
mask: FilterMask,
) -> VortexResult<ArrayData>
fn filter( &self, array: &VarBinArray, mask: FilterMask, ) -> VortexResult<ArrayData>
Filter an array by the provided predicate.
source§impl<'a> FromIterator<Option<&'a [u8]>> for VarBinArray
impl<'a> FromIterator<Option<&'a [u8]>> for VarBinArray
source§impl<'a> FromIterator<Option<&'a str>> for VarBinArray
impl<'a> FromIterator<Option<&'a str>> for VarBinArray
source§impl FromIterator<Option<String>> for VarBinArray
impl FromIterator<Option<String>> for VarBinArray
source§impl FromIterator<Option<Vec<u8>>> for VarBinArray
impl FromIterator<Option<Vec<u8>>> for VarBinArray
source§impl IntoArrayData for VarBinArray
impl IntoArrayData for VarBinArray
fn into_array(self) -> ArrayData
source§impl IntoCanonical for VarBinArray
impl IntoCanonical for VarBinArray
fn into_canonical(self) -> VortexResult<Canonical>
fn into_arrow(self) -> VortexResult<ArrayRef>
source§impl ScalarAtFn<VarBinArray> for VarBinEncoding
impl ScalarAtFn<VarBinArray> for VarBinEncoding
fn scalar_at(&self, array: &VarBinArray, index: usize) -> VortexResult<Scalar>
source§impl SliceFn<VarBinArray> for VarBinEncoding
impl SliceFn<VarBinArray> for VarBinEncoding
source§fn slice(
&self,
array: &VarBinArray,
start: usize,
stop: usize,
) -> VortexResult<ArrayData>
fn slice( &self, array: &VarBinArray, 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<VarBinArray> for VarBinEncoding
impl StatisticsVTable<VarBinArray> for VarBinEncoding
source§fn compute_statistics(
&self,
array: &VarBinArray,
stat: Stat,
) -> VortexResult<StatsSet>
fn compute_statistics( &self, array: &VarBinArray, stat: Stat, ) -> VortexResult<StatsSet>
Compute the requested statistic. Can return additional stats.
source§impl TakeFn<VarBinArray> for VarBinEncoding
impl TakeFn<VarBinArray> for VarBinEncoding
source§impl<'a> TryFrom<&'a ArrayData> for &'a VarBinArray
impl<'a> TryFrom<&'a ArrayData> for &'a VarBinArray
source§impl TryFrom<ArrayData> for VarBinArray
impl TryFrom<ArrayData> for VarBinArray
source§impl ValidityVTable<VarBinArray> for VarBinEncoding
impl ValidityVTable<VarBinArray> for VarBinEncoding
fn is_valid(&self, array: &VarBinArray, index: usize) -> bool
fn logical_validity(&self, array: &VarBinArray) -> LogicalValidity
source§impl VariantsVTable<VarBinArray> for VarBinEncoding
impl VariantsVTable<VarBinArray> for VarBinEncoding
fn as_utf8_array<'a>( &self, array: &'a VarBinArray, ) -> Option<&'a dyn Utf8ArrayTrait>
fn as_binary_array<'a>( &self, array: &'a VarBinArray, ) -> 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<VarBinArray> for VarBinEncoding
impl VisitorVTable<VarBinArray> for VarBinEncoding
fn accept( &self, array: &VarBinArray, visitor: &mut dyn ArrayVisitor, ) -> VortexResult<()>
impl ArrayTrait for VarBinArray
impl BinaryArrayTrait for VarBinArray
impl Utf8ArrayTrait for VarBinArray
Auto Trait Implementations§
impl !Freeze for VarBinArray
impl !RefUnwindSafe for VarBinArray
impl Send for VarBinArray
impl Sync for VarBinArray
impl Unpin for VarBinArray
impl !UnwindSafe for VarBinArray
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
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>
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