wjones127 commented on code in PR #13338:
URL: https://github.com/apache/arrow/pull/13338#discussion_r892464526


##########
cpp/src/arrow/dataset/file_base.cc:
##########
@@ -265,7 +265,20 @@ Status FileWriter::Write(RecordBatchReader* batches) {
 }
 
 Future<> FileWriter::Finish() {
-  return FinishInternal().Then([this]() { return destination_->CloseAsync(); 
});
+  return FinishInternal()
+      .Then([this]() {
+        ARROW_ASSIGN_OR_RAISE(bytes_written_, destination_->Tell());
+        return Status::OK();
+      })
+      .Then([this]() { return destination_->CloseAsync(); });

Review Comment:
   I'm new to working with the Arrow's Future class. The first closure returns 
a Status, and the second a Future, so I wasn't sure how to combine them. 



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