pub trait ExecuteArrowExt: IntoArray + Sized {
// Provided methods
fn execute_arrow(
self,
target: Option<&Field>,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowArrayRef> { ... }
fn execute_arrow_with_options(
self,
target: Option<&Field>,
options: &ArrowExportOptions,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowArrayRef> { ... }
}Expand description
Execution of a Vortex array into an Arrow array, for every type that implements IntoArray.
An export uses the ArrowSession of its ExecutionCtx for every decision: the export
plugins, the checks of the target, and the Arrow types of nested arrays. It takes no other
session, so one export can never mix the plugins of two sessions.
use vortex_arrow::ExecuteArrowExt;
let session = VortexSession::empty();
let array = VarBinViewArray::from_iter_str(["a", "b"]).into_array();
let arrow = array.execute_arrow(None, &mut session.create_execution_ctx())?;
assert_eq!(arrow.len(), 2);Provided Methods§
Sourcefn execute_arrow(
self,
target: Option<&Field>,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowArrayRef>
fn execute_arrow( self, target: Option<&Field>, ctx: &mut ExecutionCtx, ) -> VortexResult<ArrowArrayRef>
Execute this array into an Arrow array of the type of target, with the default
ArrowExportOptions.
A target with an Arrow extension name goes to the plugins registered for that name, in
registration order. If none of them accepts the array, but the name is the Vortex ID of the
array, the array exports as its storage (see ArrowSession).
Without a target, the array exports to the field from
ArrowSession::default_arrow_export_field, so it fails for the same types.
Sourcefn execute_arrow_with_options(
self,
target: Option<&Field>,
options: &ArrowExportOptions,
ctx: &mut ExecutionCtx,
) -> VortexResult<ArrowArrayRef>
fn execute_arrow_with_options( self, target: Option<&Field>, options: &ArrowExportOptions, ctx: &mut ExecutionCtx, ) -> VortexResult<ArrowArrayRef>
Execute this array into an Arrow array with options, which reach every nested array and
every export plugin.
Otherwise, this behaves like execute_arrow.
use vortex_arrow::ExecuteArrowExt;
let session = VortexSession::empty();
let array = VarBinViewArray::from_iter_str(["a", "b"]).into_array();
let options = ArrowExportOptions::default().with(CompactBuffers(false));
let arrow =
array.execute_arrow_with_options(None, &options, &mut session.create_execution_ctx())?;
assert_eq!(arrow.len(), 2);Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".