MCPcopy Create free account
hub / github.com/apache/arrow / RegisterTabularFunction

Function RegisterTabularFunction

python/pyarrow/src/arrow/python/udf.cc:504–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504Status RegisterTabularFunction(PyObject* function, UdfWrapperCallback cb,
505 const UdfOptions& options,
506 compute::FunctionRegistry* registry) {
507 if (options.arity.num_args != 0 || options.arity.is_varargs) {
508 return Status::NotImplemented("tabular function of non-null arity");
509 }
510 if (options.output_type->id() != Type::type::STRUCT) {
511 return Status::Invalid("tabular function with non-struct output");
512 }
513 return RegisterUdf<compute::ScalarFunction, compute::ScalarKernel>(
514 function, PythonTableUdfKernelInit{std::make_shared<OwnedRefNoGIL>(function), cb},
515 cb, options, registry);
516}
517
518Status RegisterScalarAggregateFunction(PyObject* function, UdfWrapperCallback cb,
519 const UdfOptions& options,

Callers

nothing calls this directly

Calls 3

NotImplementedFunction · 0.50
InvalidFunction · 0.50
idMethod · 0.45

Tested by

no test coverage detected