Skip to main content

FromArrowArray

Trait FromArrowArray 

Source
pub trait FromArrowArray<A> {
    // Required method
    fn from_arrow(array: A, nullable: bool) -> VortexResult<Self>
       where Self: Sized;
}
Expand description

Construct a Vortex array from an Arrow array (or other Arrow container) of type A.

Implementations reuse the underlying Arrow buffers without copying wherever the Arrow and Vortex memory layouts allow it.

Required Methods§

Source

fn from_arrow(array: A, nullable: bool) -> VortexResult<Self>
where Self: Sized,

Convert array into a Vortex array whose DType has the requested nullable Nullability.

An Arrow array can carry a validity (null) buffer regardless of whether its schema declares the field nullable, so the desired nullability is supplied separately by the caller (typically from the corresponding Arrow Field’s is_nullable). This flag is reconciled with the array’s physical nulls as follows:

  • nullable == true: the resulting validity is derived from the array’s null buffer, or all-valid when the array has none.
  • nullable == false: the array must contain no nulls, and the result is non-nullable.
§Errors

Returns an error if nullable is false but array physically contains one or more nulls (including an Arrow NullArray, which is entirely null), or if the Arrow data type is not supported.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl FromArrowArray<&BooleanArray> for ArrayRef

Source§

impl FromArrowArray<&FixedSizeListArray> for ArrayRef

Source§

impl FromArrowArray<&NullArray> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Date32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Date64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal32Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal64Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal128Type>> for ArrayRef

Source§

impl FromArrowArray<&PrimitiveArray<Decimal256Type>> 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<Int8Type>> 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<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<UInt8Type>> 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<&RecordBatch> for ArrayRef

Source§

impl FromArrowArray<&StructArray> for ArrayRef

Source§

impl FromArrowArray<&dyn Array> for ArrayRef

Source§

impl FromArrowArray<RecordBatch> for ArrayRef

Source§

impl<K: ArrowDictionaryKeyType> FromArrowArray<&DictionaryArray<K>> for DictArray

Source§

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

Source§

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

Source§

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

Source§

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