Struct vortex_array::array::StructArray
source · pub struct StructArray(/* private fields */);
Implementations§
source§impl StructArray
impl StructArray
source§impl StructArray
impl StructArray
pub fn validity(&self) -> Validity
pub fn children(&self) -> impl Iterator<Item = ArrayData> + '_
pub fn try_new( names: FieldNames, fields: Vec<ArrayData>, length: usize, validity: Validity, ) -> VortexResult<Self>
pub fn from_fields<N: AsRef<str>>( items: &[(N, ArrayData)], ) -> VortexResult<Self>
sourcepub fn project(&self, projection: &[Field]) -> VortexResult<Self>
pub fn project(&self, projection: &[Field]) -> VortexResult<Self>
Return a new StructArray with the given projection applied.
Projection does not copy data arrays. Projection is defined by an ordinal array slice which specifies the new ordering of columns in the struct. The projection can be used to perform column re-ordering, deletion, or duplication at a logical level, without any data copying.
Trait Implementations§
source§impl AsRef<ArrayData> for StructArray
impl AsRef<ArrayData> for StructArray
source§impl Clone for StructArray
impl Clone for StructArray
source§fn clone(&self) -> StructArray
fn clone(&self) -> StructArray
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 Debug for StructArray
impl Debug for StructArray
source§impl FilterFn<StructArray> for StructEncoding
impl FilterFn<StructArray> for StructEncoding
source§fn filter(
&self,
array: &StructArray,
mask: FilterMask,
) -> VortexResult<ArrayData>
fn filter( &self, array: &StructArray, mask: FilterMask, ) -> VortexResult<ArrayData>
Filter an array by the provided predicate.
source§impl IntoArrayData for StructArray
impl IntoArrayData for StructArray
fn into_array(self) -> ArrayData
source§impl IntoCanonical for StructArray
impl IntoCanonical for StructArray
source§fn into_canonical(self) -> VortexResult<Canonical>
fn into_canonical(self) -> VortexResult<Canonical>
StructEncoding is the canonical form for a [DType::Struct] array, so return self.
fn into_arrow(self) -> VortexResult<ArrayRef>where
Self: Sized,
source§impl ScalarAtFn<StructArray> for StructEncoding
impl ScalarAtFn<StructArray> for StructEncoding
fn scalar_at(&self, array: &StructArray, index: usize) -> VortexResult<Scalar>
source§impl SliceFn<StructArray> for StructEncoding
impl SliceFn<StructArray> for StructEncoding
source§fn slice(
&self,
array: &StructArray,
start: usize,
stop: usize,
) -> VortexResult<ArrayData>
fn slice( &self, array: &StructArray, 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<StructArray> for StructEncoding
impl StatisticsVTable<StructArray> for StructEncoding
source§fn compute_statistics(
&self,
array: &StructArray,
stat: Stat,
) -> VortexResult<StatsSet>
fn compute_statistics( &self, array: &StructArray, stat: Stat, ) -> VortexResult<StatsSet>
Compute the requested statistic. Can return additional stats.
source§impl StructArrayTrait for StructArray
impl StructArrayTrait for StructArray
source§impl TakeFn<StructArray> for StructEncoding
impl TakeFn<StructArray> for StructEncoding
source§impl<'a> TryFrom<&'a ArrayData> for &'a StructArray
impl<'a> TryFrom<&'a ArrayData> for &'a StructArray
source§impl TryFrom<ArrayData> for StructArray
impl TryFrom<ArrayData> for StructArray
source§impl TryFrom<StructArray> for RecordBatch
impl TryFrom<StructArray> for RecordBatch
source§impl ValidityVTable<StructArray> for StructEncoding
impl ValidityVTable<StructArray> for StructEncoding
fn is_valid(&self, array: &StructArray, index: usize) -> bool
fn logical_validity(&self, array: &StructArray) -> LogicalValidity
source§impl VariantsVTable<StructArray> for StructEncoding
impl VariantsVTable<StructArray> for StructEncoding
fn as_struct_array<'a>( &self, array: &'a StructArray, ) -> Option<&'a dyn StructArrayTrait>
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_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_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<StructArray> for StructEncoding
impl VisitorVTable<StructArray> for StructEncoding
fn accept( &self, array: &StructArray, visitor: &mut dyn ArrayVisitor, ) -> VortexResult<()>
impl ArrayTrait for StructArray
Auto Trait Implementations§
impl !Freeze for StructArray
impl !RefUnwindSafe for StructArray
impl Send for StructArray
impl Sync for StructArray
impl Unpin for StructArray
impl !UnwindSafe for StructArray
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