pub type ArrayRef = Arc<dyn Array>;Expand description
A reference counted pointer to a dynamic Array trait object.
Aliased Type§
pub struct ArrayRef { /* private fields */ }Trait Implementations§
Source§impl ArrayBuiltins for ArrayRef
impl ArrayBuiltins for ArrayRef
Source§fn fill_null(&self, fill_value: impl Into<Scalar>) -> VortexResult<ArrayRef>
fn fill_null(&self, fill_value: impl Into<Scalar>) -> VortexResult<ArrayRef>
Replace null values with the given fill value.
Source§fn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<ArrayRef>
fn get_item(&self, field_name: impl Into<FieldName>) -> VortexResult<ArrayRef>
Get item by field name (for struct types).
Source§fn is_null(&self) -> VortexResult<ArrayRef>
fn is_null(&self) -> VortexResult<ArrayRef>
Is null check.
Source§fn mask(self, mask: ArrayRef) -> VortexResult<ArrayRef>
fn mask(self, mask: ArrayRef) -> VortexResult<ArrayRef>
Mask the array using the given boolean mask.
The resulting array’s validity is the intersection of the original array’s validity
and the mask’s validity.
Source§fn not(&self) -> VortexResult<ArrayRef>
fn not(&self) -> VortexResult<ArrayRef>
Boolean negation.
Source§fn zip(&self, if_false: ArrayRef, mask: ArrayRef) -> VortexResult<ArrayRef>
fn zip(&self, if_false: ArrayRef, mask: ArrayRef) -> VortexResult<ArrayRef>
Conditional selection:
result[i] = if mask[i] then self[i] else if_false[i].Source§fn between(
self,
lower: ArrayRef,
upper: ArrayRef,
options: BetweenOptions,
) -> VortexResult<ArrayRef>
fn between( self, lower: ArrayRef, upper: ArrayRef, options: BetweenOptions, ) -> VortexResult<ArrayRef>
Compare a values between lower </<= value </<= upper
Source§impl ArrayOptimizer for ArrayRef
impl ArrayOptimizer for ArrayRef
Source§fn optimize(&self) -> VortexResult<ArrayRef>
fn optimize(&self) -> VortexResult<ArrayRef>
Optimize the root array node only.
Source§fn optimize_recursive(&self) -> VortexResult<ArrayRef>
fn optimize_recursive(&self) -> VortexResult<ArrayRef>
Optimize the entire array tree recursively.
Source§impl ArrowArrayExecutor for ArrayRef
impl ArrowArrayExecutor for ArrayRef
Source§fn execute_arrow(
self,
data_type: Option<&DataType>,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowArrayRef>
fn execute_arrow( self, data_type: Option<&DataType>, ctx: &mut ExecutionCtx, ) -> VortexResult<ArrowArrayRef>
Execute the array to produce an Arrow array. Read more
Source§fn execute_record_batches(
self,
schema: &Schema,
ctx: &mut ExecutionCtx,
) -> VortexResult<Vec<RecordBatch>>
fn execute_record_batches( self, schema: &Schema, ctx: &mut ExecutionCtx, ) -> VortexResult<Vec<RecordBatch>>
Execute the array to produce Arrow
RecordBatch’s with the given schema.Source§fn execute_record_batch(
self,
schema: &Schema,
ctx: &mut ExecutionCtx,
) -> VortexResult<RecordBatch>
fn execute_record_batch( self, schema: &Schema, ctx: &mut ExecutionCtx, ) -> VortexResult<RecordBatch>
Execute the array to produce an Arrow
RecordBatch with the given schema.Source§impl Executable for ArrayRef
impl Executable for ArrayRef
It attempts to take the smallest possible step of execution such that the returned array is incrementally more “executed” than the input array. In other words, it is closer to becoming a canonical array.
The execution steps are as follows: 0. Check for canonical.
- Attempt to call
reduce_parenton each child. - Attempt to
reducethe array with metadata-only optimizations. - Attempt to call
execute_parenton each child. - Call
executeon the array itself.
Most users will not call this method directly, instead preferring to specify an executable
target such as crate::Columnar, Canonical, or any of the canonical array types (such as
crate::arrays::PrimitiveArray).
fn execute(array: ArrayRef, ctx: &mut ExecutionCtx) -> VortexResult<Self>
Source§impl From<ArrowArray> for ArrayRef
impl From<ArrowArray> for ArrayRef
Source§fn from(value: ArrowArray) -> ArrayRef
fn from(value: ArrowArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<ChunkedArray> for ArrayRef
impl From<ChunkedArray> for ArrayRef
Source§fn from(value: ChunkedArray) -> ArrayRef
fn from(value: ChunkedArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<ConstantArray> for ArrayRef
impl From<ConstantArray> for ArrayRef
Source§fn from(value: ConstantArray) -> ArrayRef
fn from(value: ConstantArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<DecimalArray> for ArrayRef
impl From<DecimalArray> for ArrayRef
Source§fn from(value: DecimalArray) -> ArrayRef
fn from(value: DecimalArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<ExtensionArray> for ArrayRef
impl From<ExtensionArray> for ArrayRef
Source§fn from(value: ExtensionArray) -> ArrayRef
fn from(value: ExtensionArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<FilterArray> for ArrayRef
impl From<FilterArray> for ArrayRef
Source§fn from(value: FilterArray) -> ArrayRef
fn from(value: FilterArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<FixedSizeListArray> for ArrayRef
impl From<FixedSizeListArray> for ArrayRef
Source§fn from(value: FixedSizeListArray) -> ArrayRef
fn from(value: FixedSizeListArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<ListViewArray> for ArrayRef
impl From<ListViewArray> for ArrayRef
Source§fn from(value: ListViewArray) -> ArrayRef
fn from(value: ListViewArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<MaskedArray> for ArrayRef
impl From<MaskedArray> for ArrayRef
Source§fn from(value: MaskedArray) -> ArrayRef
fn from(value: MaskedArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<PrimitiveArray> for ArrayRef
impl From<PrimitiveArray> for ArrayRef
Source§fn from(value: PrimitiveArray) -> ArrayRef
fn from(value: PrimitiveArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<ScalarFnArray> for ArrayRef
impl From<ScalarFnArray> for ArrayRef
Source§fn from(value: ScalarFnArray) -> ArrayRef
fn from(value: ScalarFnArray) -> ArrayRef
Converts to this type from the input type.
Source§fn from(value: SharedArray) -> ArrayRef
fn from(value: SharedArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<SliceArray> for ArrayRef
impl From<SliceArray> for ArrayRef
Source§fn from(value: SliceArray) -> ArrayRef
fn from(value: SliceArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<StructArray> for ArrayRef
impl From<StructArray> for ArrayRef
Source§fn from(value: StructArray) -> ArrayRef
fn from(value: StructArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<TemporalArray> for ArrayRef
impl From<TemporalArray> for ArrayRef
Source§fn from(value: TemporalArray) -> Self
fn from(value: TemporalArray) -> Self
Converts to this type from the input type.
Source§impl From<VarBinArray> for ArrayRef
impl From<VarBinArray> for ArrayRef
Source§fn from(value: VarBinArray) -> ArrayRef
fn from(value: VarBinArray) -> ArrayRef
Converts to this type from the input type.
Source§impl From<VarBinViewArray> for ArrayRef
impl From<VarBinViewArray> for ArrayRef
Source§fn from(value: VarBinViewArray) -> ArrayRef
fn from(value: VarBinViewArray) -> ArrayRef
Converts to this type from the input type.
Source§impl FromArrowArray<&BooleanArray> for ArrayRef
impl FromArrowArray<&BooleanArray> for ArrayRef
fn from_arrow(value: &ArrowBooleanArray, nullable: bool) -> VortexResult<Self>
Source§impl FromArrowArray<&FixedSizeListArray> for ArrayRef
impl FromArrowArray<&FixedSizeListArray> for ArrayRef
fn from_arrow( array: &ArrowFixedSizeListArray, nullable: bool, ) -> VortexResult<Self>
Source§impl<T: ByteArrayType> FromArrowArray<&GenericByteArray<T>> for ArrayRef
impl<T: ByteArrayType> FromArrowArray<&GenericByteArray<T>> for ArrayRef
fn from_arrow(value: &GenericByteArray<T>, nullable: bool) -> VortexResult<Self>
Source§impl<T: ByteViewType> FromArrowArray<&GenericByteViewArray<T>> for ArrayRef
impl<T: ByteViewType> FromArrowArray<&GenericByteViewArray<T>> for ArrayRef
fn from_arrow( value: &GenericByteViewArray<T>, nullable: bool, ) -> VortexResult<Self>
Source§impl<O: IntegerPType + OffsetSizeTrait> FromArrowArray<&GenericListArray<O>> for ArrayRef
impl<O: IntegerPType + OffsetSizeTrait> FromArrowArray<&GenericListArray<O>> for ArrayRef
fn from_arrow(value: &GenericListArray<O>, nullable: bool) -> VortexResult<Self>
Source§impl<O: OffsetSizeTrait + NativePType> FromArrowArray<&GenericListViewArray<O>> for ArrayRef
impl<O: OffsetSizeTrait + NativePType> FromArrowArray<&GenericListViewArray<O>> for ArrayRef
fn from_arrow( array: &GenericListViewArray<O>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&NullArray> for ArrayRef
impl FromArrowArray<&NullArray> for ArrayRef
fn from_arrow(value: &ArrowNullArray, nullable: bool) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Date32Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Date32Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Date32Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Date64Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Date64Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Date64Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Decimal128Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Decimal128Type>> for ArrayRef
fn from_arrow( array: &ArrowPrimitiveArray<Decimal128Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Decimal256Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Decimal256Type>> for ArrayRef
fn from_arrow( array: &ArrowPrimitiveArray<Decimal256Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Decimal32Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Decimal32Type>> for ArrayRef
fn from_arrow( array: &ArrowPrimitiveArray<Decimal32Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Decimal64Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Decimal64Type>> for ArrayRef
fn from_arrow( array: &ArrowPrimitiveArray<Decimal64Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Float16Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Float16Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Float16Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Float32Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Float32Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Float32Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Float64Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Float64Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Float64Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Int16Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Int16Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Int16Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Int32Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Int32Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Int32Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Int64Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Int64Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Int64Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Int8Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Int8Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Int8Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Time32MillisecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Time32MillisecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Time32MillisecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Time32SecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Time32SecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Time32SecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Time64MicrosecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Time64MicrosecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Time64MicrosecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<Time64NanosecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<Time64NanosecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<Time64NanosecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<TimestampMicrosecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<TimestampMicrosecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<TimestampMicrosecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<TimestampMillisecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<TimestampMillisecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<TimestampMillisecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<TimestampNanosecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<TimestampNanosecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<TimestampNanosecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<TimestampSecondType>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<TimestampSecondType>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<TimestampSecondType>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<UInt16Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<UInt16Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<UInt16Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<UInt32Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<UInt32Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<UInt32Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<UInt64Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<UInt64Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<UInt64Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&PrimitiveArray<UInt8Type>> for ArrayRef
impl FromArrowArray<&PrimitiveArray<UInt8Type>> for ArrayRef
fn from_arrow( value: &ArrowPrimitiveArray<UInt8Type>, nullable: bool, ) -> VortexResult<Self>
Source§impl FromArrowArray<&RecordBatch> for ArrayRef
impl FromArrowArray<&RecordBatch> for ArrayRef
fn from_arrow(array: &RecordBatch, nullable: bool) -> VortexResult<Self>
Source§impl FromArrowArray<&StructArray> for ArrayRef
impl FromArrowArray<&StructArray> for ArrayRef
fn from_arrow(value: &ArrowStructArray, nullable: bool) -> VortexResult<Self>
Source§impl FromArrowArray<&dyn Array> for ArrayRef
impl FromArrowArray<&dyn Array> for ArrayRef
fn from_arrow(array: &dyn ArrowArray, nullable: bool) -> VortexResult<Self>
Source§impl FromArrowArray<RecordBatch> for ArrayRef
impl FromArrowArray<RecordBatch> for ArrayRef
fn from_arrow(array: RecordBatch, nullable: bool) -> VortexResult<Self>
Source§impl IntoArrowArray for ArrayRef
impl IntoArrowArray for ArrayRef
Source§fn into_arrow_preferred(self) -> VortexResult<ArrowArrayRef>
fn into_arrow_preferred(self) -> VortexResult<ArrowArrayRef>
Convert this crate::ArrayRef into an Arrow crate::ArrayRef by using the array’s
preferred (cheapest) Arrow DataType.
fn into_arrow(self, data_type: &DataType) -> VortexResult<ArrowArrayRef>
Source§impl ReduceNode for ArrayRef
impl ReduceNode for ArrayRef
Source§fn node_dtype(&self) -> VortexResult<DType>
fn node_dtype(&self) -> VortexResult<DType>
Return the data type of this node.
Source§fn scalar_fn(&self) -> Option<&ScalarFn>
fn scalar_fn(&self) -> Option<&ScalarFn>
Return this node’s scalar function if it is indeed a scalar fn.
Source§fn child(&self, idx: usize) -> ReduceNodeRef
fn child(&self, idx: usize) -> ReduceNodeRef
Descend to the child of this handle.
Source§fn child_count(&self) -> usize
fn child_count(&self) -> usize
Returns the number of children of this node.