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

Function call_fn_wrapper

datafusion/ffi/src/udtf.rs:105–132  ·  view source on GitHub ↗
(
    udtf: &FFI_TableFunction,
    args: SVec<u8>,
)

Source from the content-addressed store, hash-verified

103}
104
105unsafe extern "C" fn call_fn_wrapper(
106 udtf: &FFI_TableFunction,
107 args: SVec<u8>,
108) -> FFI_Result<FFI_TableProvider> {
109 let runtime = udtf.runtime();
110 let udtf_inner = udtf.inner();
111
112 let ctx: Arc<TaskContext> =
113 sresult_return!((&udtf.logical_codec.task_ctx_provider).try_into());
114 let codec: Arc<dyn LogicalExtensionCodec> = (&udtf.logical_codec).into();
115
116 let proto_filters = sresult_return!(LogicalExprList::decode(args.as_ref()));
117
118 let args = sresult_return!(parse_exprs(
119 proto_filters.expr.iter(),
120 ctx.as_ref(),
121 codec.as_ref()
122 ));
123
124 #[expect(deprecated)]
125 let table_provider = sresult_return!(udtf_inner.call(&args));
126 FFI_Result::Ok(FFI_TableProvider::new_with_ffi_codec(
127 table_provider,
128 false,
129 runtime,
130 udtf.logical_codec.clone(),
131 ))
132}
133
134unsafe extern "C" fn call_with_args_wrapper(
135 udtf: &FFI_TableFunction,

Callers

nothing calls this directly

Calls 4

runtimeMethod · 0.45
innerMethod · 0.45
intoMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…