rtpsw commented on code in PR #13375:
URL: https://github.com/apache/arrow/pull/13375#discussion_r896846352


##########
cpp/src/arrow/engine/substrait/util.cc:
##########
@@ -68,7 +68,7 @@ class SubstraitExecutor {
                              compute::ExecContext exec_context)
       : plan_(std::move(plan)), exec_context_(exec_context) {}
 
-  ~SubstraitExecutor() { ARROW_CHECK_OK(this->Close()); }
+  ~SubstraitExecutor() { ARROW_UNUSED(this->Close()); }

Review Comment:
   It gets checked [earlier 
here](https://github.com/apache/arrow/pull/13375/files#diff-0078df867c0f64dcfe79c149ee007f0933d164a32f122e28d79872a969b5be05R121).
 I moved the check there because I observed that the original code crashed (in 
this destructor) when there was some error during the execution of the plan. 
Such errors happen normally, and I wanted explanations for errors to surface.
   
   Regarding a warning in the destructor, I could add it if you still want it. 
Note that an error would get logged even if the user handled the error in the 
[earlier call to 
`ExecuteSerializedPlan`](https://github.com/apache/arrow/pull/13375/files#diff-0078df867c0f64dcfe79c149ee007f0933d164a32f122e28d79872a969b5be05R111),
 and I'm not sure this is what users would like.



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