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


##########
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:
   I agree. Also note that the flag-solution could still lead to a crash in the 
destructor if `Close()` fails there and was not called earlier. Besides 
avoiding a crash, the proposed `SubstraitExecutor` code ensures that 
`ExecuteSerializedPlan` either successfully calls `Close()` or reports some 
error back.



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