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