MCPcopy Create free account
hub / github.com/apache/datafusion / create_physical_plan_fn_wrapper

Function create_physical_plan_fn_wrapper

datafusion/ffi/src/session/mod.rs:163–185  ·  view source on GitHub ↗
(
    session: &FFI_SessionRef,
    logical_plan_serialized: SVec<u8>,
)

Source from the content-addressed store, hash-verified

161}
162
163unsafe extern "C" fn create_physical_plan_fn_wrapper(
164 session: &FFI_SessionRef,
165 logical_plan_serialized: SVec<u8>,
166) -> FfiFuture<FFI_Result<FFI_ExecutionPlan>> {
167 unsafe {
168 let runtime = session.runtime().clone();
169 let session = session.clone();
170 async move {
171 let session = session.inner();
172 let task_ctx = session.task_ctx();
173
174 let logical_plan = sresult_return!(logical_plan_from_bytes(
175 logical_plan_serialized.as_slice(),
176 task_ctx.as_ref(),
177 ));
178
179 let physical_plan = session.create_physical_plan(&logical_plan).await;
180
181 sresult!(physical_plan.map(|plan| FFI_ExecutionPlan::new(plan, runtime)))
182 }
183 .into_ffi()
184 }
185}
186
187unsafe extern "C" fn create_physical_expr_fn_wrapper(
188 session: &FFI_SessionRef,

Callers

nothing calls this directly

Calls 5

cloneMethod · 0.45
runtimeMethod · 0.45
innerMethod · 0.45
task_ctxMethod · 0.45
create_physical_planMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…