| 1420 | |
| 1421 | struct StreamDecoderWriterHelper : public StreamWriterHelper { |
| 1422 | Status ReadBatches(const IpcReadOptions& options, RecordBatchVector* out_batches, |
| 1423 | ReadStats* out_stats = nullptr, |
| 1424 | MetadataVector* out_metadata_list = nullptr) override { |
| 1425 | auto listener = std::make_shared<CopyCollectListener>(); |
| 1426 | StreamDecoder decoder(listener, options); |
| 1427 | RETURN_NOT_OK(DoConsume(&decoder)); |
| 1428 | *out_batches = listener->record_batches(); |
| 1429 | if (out_stats) { |
| 1430 | *out_stats = decoder.stats(); |
| 1431 | } |
| 1432 | return Status::OK(); |
| 1433 | } |
| 1434 | |
| 1435 | Status ReadSchema(const IpcReadOptions& read_options, |
| 1436 | std::shared_ptr<Schema>* out) override { |
nothing calls this directly
no test coverage detected