| 589 | } |
| 590 | |
| 591 | Status WriteTable(const ::arrow::Table& table, ::arrow::MemoryPool* pool, |
| 592 | std::shared_ptr<::arrow::io::OutputStream> sink, int64_t chunk_size, |
| 593 | std::shared_ptr<WriterProperties> properties, |
| 594 | std::shared_ptr<ArrowWriterProperties> arrow_properties) { |
| 595 | std::unique_ptr<FileWriter> writer; |
| 596 | ARROW_ASSIGN_OR_RAISE( |
| 597 | writer, FileWriter::Open(*table.schema(), pool, std::move(sink), |
| 598 | std::move(properties), std::move(arrow_properties))); |
| 599 | RETURN_NOT_OK(writer->WriteTable(table, chunk_size)); |
| 600 | return writer->Close(); |
| 601 | } |
| 602 | |
| 603 | } // namespace parquet::arrow |