| 1578 | namespace internal { |
| 1579 | |
| 1580 | Result<std::unique_ptr<RecordBatchWriter>> OpenRecordBatchWriter( |
| 1581 | std::unique_ptr<IpcPayloadWriter> sink, const std::shared_ptr<Schema>& schema, |
| 1582 | const IpcWriteOptions& options) { |
| 1583 | // constructor for IpcFormatWriter here dereferences ptr to schema. |
| 1584 | if (schema == nullptr) { |
| 1585 | return Status::Invalid("nullptr for Schema not allowed"); |
| 1586 | } |
| 1587 | auto writer = std::make_unique<internal::IpcFormatWriter>( |
| 1588 | std::move(sink), schema, options, /*is_file_format=*/false); |
| 1589 | RETURN_NOT_OK(writer->Start()); |
| 1590 | return writer; |
| 1591 | } |
| 1592 | |
| 1593 | Result<std::unique_ptr<IpcPayloadWriter>> MakePayloadStreamWriter( |
| 1594 | io::OutputStream* sink, const IpcWriteOptions& options) { |
no test coverage detected