zanmato1984 commented on code in PR #46711:
URL: https://github.com/apache/arrow/pull/46711#discussion_r2141218099


##########
cpp/src/arrow/dataset/dataset_writer.cc:
##########
@@ -217,21 +227,26 @@ class DatasetWriterFileQueue {
   Status Finish() {
     writer_state_->staged_rows_count -= rows_currently_staged_;
     while (!staged_batches_.empty()) {
-      RETURN_NOT_OK(PopAndDeliverStagedBatch());
+      auto st = PopAndDeliverStagedBatch().status();
+      if (!st.ok()) {
+        file_tasks_.reset();
+        return st;
+      }

Review Comment:
   I agree the name is confusing. I do believe when given a less confusing 
name, this can be an actually useful macro. How about we rename it to something 
like `RETURN_NOT_OK_AFTER` (in follow-up PR)?



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