| 1594 | namespace internal { |
| 1595 | |
| 1596 | Result<std::unique_ptr<RecordBatchWriter>> OpenRecordBatchWriter( |
| 1597 | std::unique_ptr<IpcPayloadWriter> sink, const std::shared_ptr<Schema>& schema, |
| 1598 | const IpcWriteOptions& options) { |
| 1599 | // constructor for IpcFormatWriter here dereferences ptr to schema. |
| 1600 | if (schema == nullptr) { |
| 1601 | return Status::Invalid("nullptr for Schema not allowed"); |
| 1602 | } |
| 1603 | auto writer = std::make_unique<internal::IpcFormatWriter>( |
| 1604 | std::move(sink), schema, options, /*is_file_format=*/false); |
| 1605 | RETURN_NOT_OK(writer->Start()); |
| 1606 | return writer; |
| 1607 | } |
| 1608 | |
| 1609 | Result<std::unique_ptr<IpcPayloadWriter>> MakePayloadStreamWriter( |
| 1610 | io::OutputStream* sink, const IpcWriteOptions& options) { |
no test coverage detected