| 1783 | } |
| 1784 | |
| 1785 | Result<const flatbuf::RecordBatch*> GetBatchFromMessage( |
| 1786 | const flatbuf::Message* message) { |
| 1787 | auto batch = message->header_as_RecordBatch(); |
| 1788 | if (batch == nullptr) { |
| 1789 | return Status::IOError( |
| 1790 | "Header-type of flatbuffer-encoded Message is not RecordBatch."); |
| 1791 | } |
| 1792 | return batch; |
| 1793 | } |
| 1794 | |
| 1795 | Result<const flatbuf::Message*> GetFlatbufMessage( |
| 1796 | const std::shared_ptr<Message>& message) { |