| 346 | } |
| 347 | |
| 348 | Status FileWriter::Write(RecordBatchReader* batches) { |
| 349 | while (true) { |
| 350 | ARROW_ASSIGN_OR_RAISE(auto batch, batches->Next()); |
| 351 | if (batch == nullptr) break; |
| 352 | RETURN_NOT_OK(Write(batch)); |
| 353 | } |
| 354 | return Status::OK(); |
| 355 | } |
| 356 | |
| 357 | Future<> FileWriter::Finish() { |
| 358 | return FinishInternal().Then([this]() -> Future<> { |