js8544 commented on code in PR #261:
URL: https://github.com/apache/arrow-cookbook/pull/261#discussion_r981112383


##########
cpp/code/basic_arrow.cc:
##########
@@ -35,6 +35,11 @@ arrow::Status ReturnNotOkMacro() {
     if (!st.ok()) {
       return st;
     }
+    auto res = builder.Finish();
+    std::shared_ptr<arrow::Array> arr;
+    if (res.ok()) {
+      arr = std::move(res).ValueUnsafe();
+    }

Review Comment:
   Hmm, the section that refers this code snippet is titled "Working with 
Status and Result" but there's no usage of `Result` at all. That's why I added 
these lines to demonstrate the usage of Result.



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

Reply via email to