| 814 | } |
| 815 | |
| 816 | Status WriteTable(const Table& table, io::OutputStream* dst, |
| 817 | const WriteProperties& properties) { |
| 818 | if (properties.version == kFeatherV1Version) { |
| 819 | return WriteFeatherV1(table, dst); |
| 820 | } else { |
| 821 | IpcWriteOptions ipc_options = IpcWriteOptions::Defaults(); |
| 822 | ipc_options.unify_dictionaries = true; |
| 823 | ipc_options.allow_64bit = true; |
| 824 | ARROW_ASSIGN_OR_RAISE( |
| 825 | ipc_options.codec, |
| 826 | util::Codec::Create(properties.compression, properties.compression_level)); |
| 827 | |
| 828 | std::shared_ptr<RecordBatchWriter> writer; |
| 829 | ARROW_ASSIGN_OR_RAISE(writer, MakeFileWriter(dst, table.schema(), ipc_options)); |
| 830 | RETURN_NOT_OK(writer->WriteTable(table, properties.chunksize)); |
| 831 | return writer->Close(); |
| 832 | } |
| 833 | } |
| 834 | |
| 835 | } // namespace feather |
| 836 | } // namespace ipc |
nothing calls this directly
no test coverage detected