niyue commented on code in PR #38632:
URL: https://github.com/apache/arrow/pull/38632#discussion_r1386042380


##########
cpp/src/gandiva/function_registry.h:
##########
@@ -52,9 +58,24 @@ class GANDIVA_EXPORT FunctionRegistry {
   arrow::Status Register(const std::vector<NativeFunction>& funcs,
                          std::shared_ptr<arrow::Buffer> bitcode_buffer);
 
+  /// \brief register a C interface function into the function registry
+  /// @param func the registered function's metadata
+  /// @param c_interface_function_ptr the function pointer to the
+  /// registered function's implementation
+  /// @param function_holder_maker this will be used as the function holder if 
the
+  /// function requires a function holder
+  arrow::Status Register(
+      NativeFunction func, void* c_interface_function_ptr,
+      std::optional<FunctionHolderMaker> function_holder_maker = std::nullopt);

Review Comment:
   This is the new API used for registering external C interface functions. If 
a function requires function holder, it can use the `function_holder_maker` to 
specify it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to