niyue commented on code in PR #38116:
URL: https://github.com/apache/arrow/pull/38116#discussion_r1368791810
##########
cpp/src/gandiva/function_registry.h:
##########
@@ -30,18 +35,41 @@ class GANDIVA_EXPORT FunctionRegistry {
public:
using iterator = const NativeFunction*;
+ FunctionRegistry();
+ FunctionRegistry(const FunctionRegistry&) = delete;
+ FunctionRegistry& operator=(const FunctionRegistry&) = delete;
+
/// Lookup a pre-compiled function by its signature.
const NativeFunction* LookupSignature(const FunctionSignature& signature)
const;
+ /// \brief register a set of functions into the function registry from a
given bitcode
+ /// file
+ arrow::Status Register(const std::vector<NativeFunction>& funcs,
+ const std::string& bitcode_path);
+
+ /// \brief register a set of functions into the function registry from a
given bitcode
+ /// buffer
+ arrow::Status Register(const std::vector<NativeFunction>& funcs,
+ std::unique_ptr<arrow::Buffer> bitcode_buffer);
Review Comment:
Sure. Updated to use `shared_ptr`, and the internal storage of
`arrow::Buffer` in `FunctionRegistry` becomes
`std::vector<std::shared_ptr<arrow::Buffer>>` now.
##########
cpp/src/gandiva/function_registry.h:
##########
@@ -30,18 +35,41 @@ class GANDIVA_EXPORT FunctionRegistry {
public:
using iterator = const NativeFunction*;
+ FunctionRegistry();
+ FunctionRegistry(const FunctionRegistry&) = delete;
+ FunctionRegistry& operator=(const FunctionRegistry&) = delete;
+
/// Lookup a pre-compiled function by its signature.
const NativeFunction* LookupSignature(const FunctionSignature& signature)
const;
+ /// \brief register a set of functions into the function registry from a
given bitcode
+ /// file
+ arrow::Status Register(const std::vector<NativeFunction>& funcs,
+ const std::string& bitcode_path);
+
+ /// \brief register a set of functions into the function registry from a
given bitcode
+ /// buffer
+ arrow::Status Register(const std::vector<NativeFunction>& funcs,
+ std::unique_ptr<arrow::Buffer> bitcode_buffer);
Review Comment:
Sure. Updated to use `shared_ptr`, and the internal storage for
`arrow::Buffer` in `FunctionRegistry` becomes
`std::vector<std::shared_ptr<arrow::Buffer>>` now.
--
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]