Skip to main content

ArrayRef

Type Alias ArrayRef 

Source
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

Source§

fn cast(&self, dtype: DType) -> VortexResult<ArrayRef>

Cast to the given data type.
Source§

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>

Get item by field name (for struct types).
Source§

fn is_null(&self) -> VortexResult<ArrayRef>

Is null check.
Source§

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>

Boolean negation.
Source§

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>

Compare a values between lower </<= value </<= upper
Source§

impl ArrayEq for ArrayRef

Source§

fn array_eq(&self, other: &Self, precision: Precision) -> bool

Source§

impl ArrayHash for ArrayRef

Source§

fn array_hash<H: Hasher>(&self, state: &mut H, precision: Precision)

Source§

impl ArrayOptimizer for ArrayRef

Source§

fn optimize(&self) -> VortexResult<ArrayRef>

Optimize the root array node only.
Source§

fn optimize_recursive(&self) -> VortexResult<ArrayRef>

Optimize the entire array tree recursively.
Source§

impl ArrowArrayExecutor for ArrayRef

Source§

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>>

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>

Execute the array to produce an Arrow RecordBatch with the given schema.
Source§

impl Executable for ArrayRef

Executing an ArrayRef into an ArrayRef is the atomic execution loop within Vortex.

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.

  1. Attempt to call reduce_parent on each child.
  2. Attempt to reduce the array with metadata-only optimizations.
  3. Attempt to call execute_parent on each child.
  4. Call execute on 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).

Source§

fn execute(array: ArrayRef, ctx: &mut ExecutionCtx) -> VortexResult<Self>

Source§

impl From<ArrowArray> for ArrayRef

Source§

fn from(value: ArrowArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<BoolArray> for ArrayRef

Source§

fn from(value: BoolArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<Canonical> for ArrayRef

Source§

fn from(value: Canonical) -> Self

Converts to this type from the input type.
Source§

impl From<ChunkedArray> for ArrayRef

Source§

fn from(value: ChunkedArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<ConstantArray> for ArrayRef

Source§

fn from(value: ConstantArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<DecimalArray> for ArrayRef

Source§

fn from(value: DecimalArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<DictArray> for ArrayRef

Source§

fn from(value: DictArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<ExtensionArray> for ArrayRef

Source§

fn from(value: ExtensionArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<FilterArray> for ArrayRef

Source§

fn from(value: FilterArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<FixedSizeListArray> for ArrayRef

Source§

fn from(value: FixedSizeListArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<ListArray> for ArrayRef

Source§

fn from(value: ListArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<ListViewArray> for ArrayRef

Source§

fn from(value: ListViewArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<MaskedArray> for ArrayRef

Source§

fn from(value: MaskedArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<NullArray> for ArrayRef

Source§

fn from(value: NullArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<PrimitiveArray> for ArrayRef

Source§

fn from(value: PrimitiveArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<ScalarFnArray> for ArrayRef

Source§

fn from(value: ScalarFnArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<SharedArray> for ArrayRef

Source§

fn from(value: SharedArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<SliceArray> for ArrayRef

Source§

fn from(value: SliceArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<StructArray> for ArrayRef

Source§

fn from(value: StructArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<TemporalArray> for ArrayRef

Source§

fn from(value: TemporalArray) -> Self

Converts to this type from the input type.
Source§

impl From<VarBinArray> for ArrayRef

Source§

fn from(value: VarBinArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl From<VarBinViewArray> for ArrayRef

Source§

fn from(value: VarBinViewArray) -> ArrayRef

Converts to this type from the input type.
Source§

impl FromArrowArray<&BooleanArray> for ArrayRef

Source§

fn from_arrow(value: &ArrowBooleanArray, nullable: bool) -> VortexResult<Self>

Source§

impl FromArrowArray<&FixedSizeListArray> for ArrayRef

Source§

fn from_arrow( array: &ArrowFixedSizeListArray, nullable: bool, ) -> VortexResult<Self>

Source§

impl<T: ByteArrayType> FromArrowArray<&GenericByteArray<T>> for ArrayRef

Source§

fn from_arrow(value: &GenericByteArray<T>, nullable: bool) -> VortexResult<Self>

Source§

impl<T: ByteViewType> FromArrowArray<&GenericByteViewArray<T>> for ArrayRef

Source§

fn from_arrow( value: &GenericByteViewArray<T>, nullable: bool, ) -> VortexResult<Self>

Source§

impl<O: IntegerPType + OffsetSizeTrait> FromArrowArray<&GenericListArray<O>> for ArrayRef

Source§

fn from_arrow(value: &GenericListArray<O>, nullable: bool) -> VortexResult<Self>

Source§

impl<O: OffsetSizeTrait + NativePType> FromArrowArray<&GenericListViewArray<O>> for ArrayRef

Source§

fn from_arrow( array: &GenericListViewArray<O>, nullable: bool, ) -> VortexResult<Self>

Source§

impl FromArrowArray<&NullArray> for ArrayRef

Source§

fn from_arrow(value: &ArrowNullArray, nullable: bool) -> VortexResult<Self>

Source§

impl FromArrowArray<&PrimitiveArray<Date32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Date64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal128Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal256Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Float16Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Float32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Float64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Int16Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Int32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Int64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Int8Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Time32MillisecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Time32SecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Time64MicrosecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Time64NanosecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<TimestampMicrosecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<TimestampMillisecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<TimestampNanosecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<TimestampSecondType>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<UInt16Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<UInt32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<UInt64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<UInt8Type>> for ArrayRef

Source§

impl FromArrowArray<&RecordBatch> for ArrayRef

Source§

fn from_arrow(array: &RecordBatch, nullable: bool) -> VortexResult<Self>

Source§

impl FromArrowArray<&StructArray> for ArrayRef

Source§

fn from_arrow(value: &ArrowStructArray, nullable: bool) -> VortexResult<Self>

Source§

impl FromArrowArray<&dyn Array> for ArrayRef

Source§

fn from_arrow(array: &dyn ArrowArray, nullable: bool) -> VortexResult<Self>

Source§

impl FromArrowArray<RecordBatch> for ArrayRef

Source§

fn from_arrow(array: RecordBatch, nullable: bool) -> VortexResult<Self>

Source§

impl IntoArray for ArrayRef

Source§

impl IntoArrowArray for ArrayRef

Source§

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.

Source§

fn into_arrow(self, data_type: &DataType) -> VortexResult<ArrowArrayRef>

Source§

impl ReduceNode for ArrayRef

Source§

fn as_any(&self) -> &dyn Any

Downcast to Any.
Source§

fn node_dtype(&self) -> VortexResult<DType>

Return the data type of this node.
Source§

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

Descend to the child of this handle.
Source§

fn child_count(&self) -> usize

Returns the number of children of this node.