lidavidm commented on code in PR #13338:
URL: https://github.com/apache/arrow/pull/13338#discussion_r892889255
##########
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:
Status implicitly converts to Future, so apart from possibly having to
explicitly annotate the return type as Future, you should be able to mix 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]