| 502 | } |
| 503 | |
| 504 | Status 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 | |
| 518 | Status RegisterScalarAggregateFunction(PyObject* function, UdfWrapperCallback cb, |
| 519 | const UdfOptions& options, |
nothing calls this directly
no test coverage detected