rok commented on code in PR #47227:
URL: https://github.com/apache/arrow/pull/47227#discussion_r2256609402


##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
 int main(int argc, char** argv) {
   if (argc < 3) {
     // Fake success for CI purposes.
+    std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;
     return EXIT_SUCCESS;
   }
 
   std::string base_save_path = argv[1];
   int mode = std::atoi(argv[2]);
-  arrow::Status status;
+  arrow::Status status = arrow::compute::Initialize();
+  if (!status.ok()) {
+    std::cout << "Error occurred: " << status.message() << std::endl;
+    return EXIT_FAILURE;
+  }

Review Comment:
   Do all examples need initialization? If not you could put 
`ARROW_RETURN_NOT_OK(arrow::compute::Initialize());` into the ones that do. 
Otherwise this is good.



##########
cpp/examples/arrow/execution_plan_documentation_examples.cc:
##########
@@ -827,12 +827,17 @@ enum ExampleMode {
 int main(int argc, char** argv) {
   if (argc < 3) {
     // Fake success for CI purposes.
+    std::cout << "Usage: " << argv[0] << " base_save_path mode" << std::endl;

Review Comment:
   Is this line required?



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