vibhatha commented on code in PR #13375:
URL: https://github.com/apache/arrow/pull/13375#discussion_r896732675
##########
cpp/src/arrow/compute/registry.cc:
##########
@@ -34,59 +34,72 @@ namespace compute {
class FunctionRegistry::FunctionRegistryImpl {
public:
- Status AddFunction(std::shared_ptr<Function> function, bool allow_overwrite)
{
-#ifndef NDEBUG
- // This validates docstrings extensively, so don't waste time on it
- // in release builds.
- RETURN_NOT_OK(function->Validate());
-#endif
+ explicit FunctionRegistryImpl(FunctionRegistryImpl* parent = NULLPTR)
+ : parent_(parent) {}
+ ~FunctionRegistryImpl() {}
- std::lock_guard<std::mutex> mutation_guard(lock_);
+ Status CanAddFunction(std::shared_ptr<Function> function, bool
allow_overwrite) {
+ if (parent_ != NULLPTR) {
+ RETURN_NOT_OK(parent_->CanAddFunction(function, allow_overwrite));
+ }
+ return DoAddFunction(function, allow_overwrite, /*add=*/false);
Review Comment:
Do we need to mention this in a comment?
--
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]