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 2022/07/08 09:15:24 UTC

[GitHub] [arrow] vibhatha commented on a diff in pull request #13397: ARROW-16444: [R] Implement user-defined scalar functions in R bindings

vibhatha commented on code in PR #13397:
URL: https://github.com/apache/arrow/pull/13397#discussion_r916625181


##########
r/src/compute-exec.cpp:
##########
@@ -196,8 +226,13 @@ void ExecPlan_Write(
                      ds::WriteNodeOptions{std::move(opts), std::move(kv)});
 
   StopIfNotOk(plan->Validate());
-  StopIfNotOk(plan->StartProducing());
-  StopIfNotOk(plan->finished().status());
+  auto result = RunWithCapturedRIfPossible<bool>([&]() -> arrow::Result<bool> {
+    RETURN_NOT_OK(plan->StartProducing());
+    RETURN_NOT_OK(plan->finished().status());
+    return true;

Review Comment:
   May be? (please compile and evaluate if it serves the purpose right)
   
   ```suggestion
       plan->finished().status().ok();
   ```



##########
r/src/compute-exec.cpp:
##########
@@ -196,8 +226,13 @@ void ExecPlan_Write(
                      ds::WriteNodeOptions{std::move(opts), std::move(kv)});
 
   StopIfNotOk(plan->Validate());
-  StopIfNotOk(plan->StartProducing());
-  StopIfNotOk(plan->finished().status());
+  auto result = RunWithCapturedRIfPossible<bool>([&]() -> arrow::Result<bool> {
+    RETURN_NOT_OK(plan->StartProducing());
+    RETURN_NOT_OK(plan->finished().status());
+    return true;

Review Comment:
   May be? (please compile and evaluate if it serves the purpose right)
   
   ```suggestion
       return plan->finished().status().ok();
   ```



-- 
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-unsubscribe@arrow.apache.org

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