pub struct StructArray { /* private fields */ }
Implementations§
Source§impl StructArray
impl StructArray
pub fn validity(&self) -> Validity
pub fn children(&self) -> impl Iterator<Item = Array> + '_
pub fn try_new( names: FieldNames, fields: Vec<Array>, length: usize, validity: Validity, ) -> VortexResult<Self>
pub fn from_fields<N: AsRef<str>>(items: &[(N, Array)]) -> 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 AcceptArrayVisitor for StructArray
impl AcceptArrayVisitor for StructArray
fn accept(&self, visitor: &mut dyn ArrayVisitor) -> VortexResult<()>
Source§impl ArrayCompute for StructArray
impl ArrayCompute for StructArray
Source§fn filter(&self) -> Option<&dyn FilterFn>
fn filter(&self) -> Option<&dyn FilterFn>
Filtering function on arrays of predicates. Read more
Source§fn scalar_at(&self) -> Option<&dyn ScalarAtFn>
fn scalar_at(&self) -> Option<&dyn ScalarAtFn>
Single item indexing on Vortex arrays. Read more
Source§fn take(&self) -> Option<&dyn TakeFn>
fn take(&self) -> Option<&dyn TakeFn>
Take a set of indices from an array. This often forces allocations and decoding of
the receiver. Read more
Source§fn cast(&self) -> Option<&dyn CastFn>
fn cast(&self) -> Option<&dyn CastFn>
Implemented for arrays that can be casted to different types. Read more
Source§fn compare(
&self,
_other: &Array,
_operator: Operator,
) -> Option<VortexResult<Array>>
fn compare( &self, _other: &Array, _operator: Operator, ) -> Option<VortexResult<Array>>
Binary operator implementation for arrays against other arrays. Read more
Source§fn fill_forward(&self) -> Option<&dyn FillForwardFn>
fn fill_forward(&self) -> Option<&dyn FillForwardFn>
Array function that returns new arrays a non-null value is repeated across runs of nulls. Read more
Source§fn subtract_scalar(&self) -> Option<&dyn SubtractScalarFn>
fn subtract_scalar(&self) -> Option<&dyn SubtractScalarFn>
Broadcast subtraction of scalar from Vortex array. Read more
Source§fn search_sorted(&self) -> Option<&dyn SearchSortedFn>
fn search_sorted(&self) -> Option<&dyn SearchSortedFn>
Perform a search over an ordered array. Read more
Source§fn and(&self) -> Option<&dyn AndFn>
fn and(&self) -> Option<&dyn AndFn>
Perform an Arrow-style boolean AND operation over two arrays Read more
Source§fn and_kleene(&self) -> Option<&dyn AndFn>
fn and_kleene(&self) -> Option<&dyn AndFn>
Perform a Kleene-style boolean AND operation over two arrays Read more
Source§impl ArrayStatisticsCompute for StructArray
impl ArrayStatisticsCompute for StructArray
Source§fn compute_statistics(&self, _stat: Stat) -> VortexResult<StatsSet>
fn compute_statistics(&self, _stat: Stat) -> VortexResult<StatsSet>
Compute the requested statistic. Can return additional stats.
Source§impl ArrayTrait for StructArray
impl ArrayTrait for StructArray
Source§impl ArrayValidity for StructArray
impl ArrayValidity for StructArray
fn is_valid(&self, index: usize) -> bool
fn logical_validity(&self) -> LogicalValidity
Source§impl ArrayVariants for StructArray
impl ArrayVariants for StructArray
fn as_struct_array(&self) -> Option<&dyn StructArrayTrait>
fn as_null_array(&self) -> Option<&dyn NullArrayTrait>
fn as_null_array_unchecked(&self) -> &dyn NullArrayTrait
fn as_bool_array(&self) -> Option<&dyn BoolArrayTrait>
fn as_bool_array_unchecked(&self) -> &dyn BoolArrayTrait
fn as_primitive_array(&self) -> Option<&dyn PrimitiveArrayTrait>
fn as_primitive_array_unchecked(&self) -> &dyn PrimitiveArrayTrait
fn as_utf8_array(&self) -> Option<&dyn Utf8ArrayTrait>
fn as_utf8_array_unchecked(&self) -> &dyn Utf8ArrayTrait
fn as_binary_array(&self) -> Option<&dyn BinaryArrayTrait>
fn as_binary_array_unchecked(&self) -> &dyn BinaryArrayTrait
fn as_struct_array_unchecked(&self) -> &dyn StructArrayTrait
fn as_list_array(&self) -> Option<&dyn ListArrayTrait>
fn as_list_array_unchecked(&self) -> &dyn ListArrayTrait
fn as_extension_array(&self) -> Option<&dyn ExtensionArrayTrait>
fn as_extension_array_unchecked(&self) -> &dyn ExtensionArrayTrait
Source§impl AsRef<Array> for StructArray
impl AsRef<Array> 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 for StructArray
impl FilterFn for StructArray
Source§impl From<StructArray> for Array
impl From<StructArray> for Array
Source§fn from(value: StructArray) -> Array
fn from(value: StructArray) -> Array
Converts to this type from the input type.
Source§impl From<TypedArray<Struct>> for StructArray
impl From<TypedArray<Struct>> for StructArray
Source§fn from(typed: TypedArray<Struct>) -> Self
fn from(typed: TypedArray<Struct>) -> Self
Converts to this type from the input type.
Source§impl GetArrayMetadata for StructArray
impl GetArrayMetadata for StructArray
fn metadata(&self) -> Arc<dyn ArrayMetadata>
Source§impl IntoArray for StructArray
impl IntoArray for StructArray
fn into_array(self) -> Array
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.
Source§impl ScalarAtFn for StructArray
impl ScalarAtFn for StructArray
Source§impl SliceFn for StructArray
impl SliceFn for StructArray
Source§impl StructArrayTrait for StructArray
impl StructArrayTrait for StructArray
Source§impl TakeFn for StructArray
impl TakeFn for StructArray
Source§impl TryFrom<&Array> for StructArray
impl TryFrom<&Array> for StructArray
Source§impl TryFrom<Array> for StructArray
impl TryFrom<Array> for StructArray
Source§impl TryFrom<StructArray> for RecordBatch
impl TryFrom<StructArray> for RecordBatch
Source§type Error = VortexError
type Error = VortexError
The type returned in the event of a conversion error.
Source§fn try_from(value: StructArray) -> VortexResult<Self>
fn try_from(value: StructArray) -> VortexResult<Self>
Performs the conversion.
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 ArrayEncoding
Source§impl<T> ArrayStatistics for T
impl<T> ArrayStatistics for T
fn statistics(&self) -> &dyn Statistics
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
)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_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