Skip to main content

ArrowImportVTable

Trait ArrowImportVTable 

Source
pub trait ArrowImportVTable:
    'static
    + Send
    + Sync
    + Debug {
    // Required methods
    fn arrow_ext_id(&self) -> Id;
    fn from_arrow_field(&self, field: &Field) -> VortexResult<Option<DType>>;
    fn from_arrow_array(
        &self,
        array: ArrowArrayRef,
        field: &Field,
        dtype: &DType,
    ) -> VortexResult<ArrowImport>;
}
Expand description

Plugin layer for importing an Arrow extension-typed array into a Vortex array.

Plugins are dispatched by arrow_ext_id.

This is purely an implementation trait, its methods should not be called directly. Instead, use the methods on ArrowSession.

Required Methods§

Source

fn arrow_ext_id(&self) -> Id

The Arrow extension name this plugin handles.

Source

fn from_arrow_field(&self, field: &Field) -> VortexResult<Option<DType>>

Build the Vortex DType that corresponds to field (which carries this plugin’s Arrow extension metadata).

Source

fn from_arrow_array( &self, array: ArrowArrayRef, field: &Field, dtype: &DType, ) -> VortexResult<ArrowImport>

Convert an Arrow array into a Vortex array of dtype.

Returns ownership of array via ArrowImport::Unsupported when the plugin cannot handle the input.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl ArrowImportVTable for Uuid

Implementors§