You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/07/30 07:34:19 UTC

[GitHub] [arrow] wesm commented on a change in pull request #7851: ARROW-9286: [C++] Add function "aliases" to compute::FunctionRegistry

wesm commented on a change in pull request #7851:
URL: https://github.com/apache/arrow/pull/7851#discussion_r462550663



##########
File path: cpp/src/arrow/compute/registry.cc
##########
@@ -45,6 +45,15 @@ class FunctionRegistry::FunctionRegistryImpl {
     return Status::OK();
   }
 
+  Status AddAlias(const std::string& target_name, const std::string& source_name) {
+    auto it = name_to_function_.find(source_name);
+    if (it == name_to_function_.end()) {
+      return Status::KeyError("No function registered with name: ", source_name);
+    }
+    name_to_function_[target_name] = it->second;

Review comment:
       This is missing synchronization (should be a rare event, but we should be diligent about these issues) -- can you open a JIRA about handling this?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org