bkietz commented on a change in pull request #11013:
URL: https://github.com/apache/arrow/pull/11013#discussion_r697539168



##########
File path: cpp/src/arrow/compute/exec/source_node.cc
##########
@@ -142,14 +143,10 @@ struct SourceNode : ExecNode {
   AsyncGenerator<util::optional<ExecBatch>> generator_;
 };
 
-}  // namespace
-
-namespace internal {
+ARROW_INITIALIZER({
+  DCHECK_OK(default_exec_factory_registry()->AddFactory("source", 
SourceNode::Make));

Review comment:
       that function only relies on a static local variable within the function 
body, which is initialized the [first time control passes through the 
decl](https://en.cppreference.com/w/cpp/language/storage_duration#Static_local_variables)-
 which means it will be fully initialized by the time 
`default_exec_factory_registry()` returns




-- 
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: github-unsubscr...@arrow.apache.org

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


Reply via email to