#[repr(C)]pub struct FFI_ExecutionPlan {
pub properties: unsafe extern "C" fn(plan: &Self) -> FFI_PlanProperties,
pub children: unsafe extern "C" fn(plan: &Self) -> Vec<FFI_ExecutionPlan>,
pub with_new_children: unsafe extern "C" fn(plan: &Self, children: Vec<Self>) -> FFI_Result<Self>,
pub name: unsafe extern "C" fn(plan: &Self) -> String,
pub execute: unsafe extern "C" fn(plan: &Self, partition: usize, context: FFI_TaskContext) -> FFI_Result<FFI_RecordBatchStream>,
pub repartitioned: unsafe extern "C" fn(plan: &Self, target_partitions: usize, config: FFI_ConfigOptions) -> FFI_Result<FFI_Option<FFI_ExecutionPlan>>,
pub metrics: unsafe extern "C" fn(plan: &Self) -> FFI_Option<FFI_MetricsSet>,
pub partition_statistics: unsafe extern "C" fn(plan: &Self, partition: FFI_Option<usize>) -> FFI_Result<Vec<u8>>,
pub clone: unsafe extern "C" fn(plan: &Self) -> Self,
pub release: unsafe extern "C" fn(arg: &mut Self),
pub private_data: *mut c_void,
pub library_marker_id: extern "C" fn() -> usize,
}Expand description
A stable struct for sharing a ExecutionPlan across FFI boundaries.
Fields§
§properties: unsafe extern "C" fn(plan: &Self) -> FFI_PlanPropertiesReturn the plan properties
children: unsafe extern "C" fn(plan: &Self) -> Vec<FFI_ExecutionPlan>Return a vector of children plans
with_new_children: unsafe extern "C" fn(plan: &Self, children: Vec<Self>) -> FFI_Result<Self>§name: unsafe extern "C" fn(plan: &Self) -> StringReturn the plan name.
execute: unsafe extern "C" fn(plan: &Self, partition: usize, context: FFI_TaskContext) -> FFI_Result<FFI_RecordBatchStream>Execute the plan and return a record batch stream. Errors will be returned as a string.
repartitioned: unsafe extern "C" fn(plan: &Self, target_partitions: usize, config: FFI_ConfigOptions) -> FFI_Result<FFI_Option<FFI_ExecutionPlan>>§metrics: unsafe extern "C" fn(plan: &Self) -> FFI_Option<FFI_MetricsSet>Snapshot the plan’s execution metrics. Returns None when the
underlying ExecutionPlan::metrics returned None.
partition_statistics: unsafe extern "C" fn(plan: &Self, partition: FFI_Option<usize>) -> FFI_Result<Vec<u8>>Snapshot partition statistics. partition == None corresponds to
statistics over all partitions; Some(idx) corresponds to a specific
partition. The returned bytes are a prost-encoded
datafusion_proto_common::Statistics.
clone: unsafe extern "C" fn(plan: &Self) -> SelfUsed to create a clone on the provider of the execution plan. This should only need to be called by the receiver of the plan.
release: unsafe extern "C" fn(arg: &mut Self)Release the memory of the private data when it is no longer being used.
private_data: *mut c_voidInternal data. This is only to be accessed by the provider of the plan.
A ForeignExecutionPlan should never attempt to access this data.
library_marker_id: extern "C" fn() -> usizeUtility to identify when FFI objects are accessed locally through
the foreign interface. See crate::get_library_marker_id and
the crate’s README.md for more information.
Implementations§
Trait Implementations§
Source§impl Clone for FFI_ExecutionPlan
impl Clone for FFI_ExecutionPlan
Source§impl Debug for FFI_ExecutionPlan
impl Debug for FFI_ExecutionPlan
Source§impl Drop for FFI_ExecutionPlan
impl Drop for FFI_ExecutionPlan
impl Send for FFI_ExecutionPlan
impl Sync for FFI_ExecutionPlan
Source§impl TryFrom<&FFI_ExecutionPlan> for Arc<dyn ExecutionPlan>
impl TryFrom<&FFI_ExecutionPlan> for Arc<dyn ExecutionPlan>
Source§type Error = DataFusionError
type Error = DataFusionError
Source§impl TryFrom<FFI_ExecutionPlan> for ForeignExecutionPlan
impl TryFrom<FFI_ExecutionPlan> for ForeignExecutionPlan
Source§type Error = DataFusionError
type Error = DataFusionError
Auto Trait Implementations§
impl Freeze for FFI_ExecutionPlan
impl RefUnwindSafe for FFI_ExecutionPlan
impl Unpin for FFI_ExecutionPlan
impl UnsafeUnpin for FFI_ExecutionPlan
impl UnwindSafe for FFI_ExecutionPlan
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more