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,
dtype: &ExtDTypeRef,
) -> VortexResult<ArrowImport>;
}Expand description
Plugin layer for importing an Arrow extension-typed array into a Vortex extension 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§
Sourcefn arrow_ext_id(&self) -> Id
fn arrow_ext_id(&self) -> Id
The Arrow extension name this plugin handles.
Sourcefn from_arrow_field(&self, field: &Field) -> VortexResult<Option<DType>>
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).
Sourcefn from_arrow_array(
&self,
array: ArrowArrayRef,
dtype: &ExtDTypeRef,
) -> VortexResult<ArrowImport>
fn from_arrow_array( &self, array: ArrowArrayRef, dtype: &ExtDTypeRef, ) -> VortexResult<ArrowImport>
Convert an Arrow array into a Vortex extension array of dtype.
Returns ownership of array via ArrowImport::Unsupported when the plugin cannot
handle the input.