| 856 | } |
| 857 | |
| 858 | Status WriteRecordBatch(const RecordBatch& batch, int64_t buffer_start_offset, |
| 859 | io::OutputStream* dst, int32_t* metadata_length, |
| 860 | int64_t* body_length, const IpcWriteOptions& options) { |
| 861 | IpcPayload payload; |
| 862 | RecordBatchSerializer assembler(buffer_start_offset, NULLPTR, options, &payload); |
| 863 | RETURN_NOT_OK(assembler.Assemble(batch)); |
| 864 | |
| 865 | // TODO: it's a rough edge that the metadata and body length here are |
| 866 | // computed separately |
| 867 | |
| 868 | // The body size is computed in the payload |
| 869 | *body_length = payload.body_length; |
| 870 | |
| 871 | return WriteIpcPayload(payload, options, dst, metadata_length); |
| 872 | } |
| 873 | |
| 874 | Status WriteRecordBatchStream(const std::vector<std::shared_ptr<RecordBatch>>& batches, |
| 875 | const IpcWriteOptions& options, io::OutputStream* dst) { |