| 601 | } |
| 602 | |
| 603 | Status WriteTable(const ::arrow::Table& table, ::arrow::MemoryPool* pool, |
| 604 | std::shared_ptr<::arrow::io::OutputStream> sink, int64_t chunk_size, |
| 605 | std::shared_ptr<WriterProperties> properties, |
| 606 | std::shared_ptr<ArrowWriterProperties> arrow_properties) { |
| 607 | std::unique_ptr<FileWriter> writer; |
| 608 | ARROW_ASSIGN_OR_RAISE( |
| 609 | writer, FileWriter::Open(*table.schema(), pool, std::move(sink), |
| 610 | std::move(properties), std::move(arrow_properties))); |
| 611 | RETURN_NOT_OK(writer->WriteTable(table, chunk_size)); |
| 612 | return writer->Close(); |
| 613 | } |
| 614 | |
| 615 | } // namespace parquet::arrow |