| 844 | } |
| 845 | |
| 846 | Status WriteRecordBatch(const RecordBatch& batch, int64_t buffer_start_offset, |
| 847 | io::OutputStream* dst, int32_t* metadata_length, |
| 848 | int64_t* body_length, const IpcWriteOptions& options) { |
| 849 | IpcPayload payload; |
| 850 | RecordBatchSerializer assembler(buffer_start_offset, NULLPTR, options, &payload); |
| 851 | RETURN_NOT_OK(assembler.Assemble(batch)); |
| 852 | |
| 853 | // TODO: it's a rough edge that the metadata and body length here are |
| 854 | // computed separately |
| 855 | |
| 856 | // The body size is computed in the payload |
| 857 | *body_length = payload.body_length; |
| 858 | |
| 859 | return WriteIpcPayload(payload, options, dst, metadata_length); |
| 860 | } |
| 861 | |
| 862 | Status WriteRecordBatchStream(const std::vector<std::shared_ptr<RecordBatch>>& batches, |
| 863 | const IpcWriteOptions& options, io::OutputStream* dst) { |