pub trait ArrowExportVTable:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn arrow_ext_id(&self) -> Id;
fn vortex_id(&self) -> Id;
fn to_arrow_field(
&self,
name: &str,
dtype: &DType,
session: &ArrowSession,
) -> VortexResult<Option<Field>>;
fn execute_arrow(
&self,
array: ArrayRef,
target: &Field,
options: &ArrowExportOptions,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowExport>;
}Expand description
Plugin layer for exporting a Vortex array to an Arrow extension type.
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 ID this plugin produces.
Sourcefn vortex_id(&self) -> Id
fn vortex_id(&self) -> Id
The Vortex array or extension ID this plugin maps from. Used only for inference by
ArrowSession::to_arrow_field / ArrowSession::to_arrow_schema; never as a
dispatch key for execute_arrow.
Sourcefn to_arrow_field(
&self,
name: &str,
dtype: &DType,
session: &ArrowSession,
) -> VortexResult<Option<Field>>
fn to_arrow_field( &self, name: &str, dtype: &DType, session: &ArrowSession, ) -> VortexResult<Option<Field>>
Build the Arrow Field this plugin produces for the given Vortex extension
dtype. Used during schema inference.
Sourcefn execute_arrow(
&self,
array: ArrayRef,
target: &Field,
options: &ArrowExportOptions,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowExport>
fn execute_arrow( &self, array: ArrayRef, target: &Field, options: &ArrowExportOptions, ctx: &mut ExecutionCtx, ) -> VortexResult<ArrowExport>
Convert a Vortex array into an Arrow array shaped to target.
Returns ownership of array via ArrowExport::Unsupported when the plugin cannot
handle the input. Plugins that export child or storage arrays must pass options on to
those exports.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".