pub trait ArrowExportVTable:
'static
+ Send
+ Sync
+ Debug {
// Required methods
fn arrow_ext_id(&self) -> Id;
fn vortex_ext_id(&self) -> ExtId;
fn to_arrow_field(
&self,
name: &str,
dtype: &ExtDTypeRef,
session: &ArrowSession,
) -> VortexResult<Option<Field>>;
fn execute_arrow(
&self,
array: ArrayRef,
target: &Field,
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_ext_id(&self) -> ExtId
fn vortex_ext_id(&self) -> ExtId
The Vortex 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: &ExtDTypeRef,
session: &ArrowSession,
) -> VortexResult<Option<Field>>
fn to_arrow_field( &self, name: &str, dtype: &ExtDTypeRef, 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,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowExport>
fn execute_arrow( &self, array: ArrayRef, target: &Field, 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.