\return the last decoded record batch with custom metadata and remove it from record_batches
| 367 | /// \return the last decoded record batch with custom metadata and |
| 368 | /// remove it from record_batches |
| 369 | RecordBatchWithMetadata PopRecordBatchWithMetadata() { |
| 370 | RecordBatchWithMetadata record_batch_with_metadata; |
| 371 | if (record_batches_.empty()) { |
| 372 | return record_batch_with_metadata; |
| 373 | } |
| 374 | record_batch_with_metadata.batch = std::move(record_batches_.back()); |
| 375 | record_batch_with_metadata.custom_metadata = std::move(metadatas_.back()); |
| 376 | record_batches_.pop_back(); |
| 377 | metadatas_.pop_back(); |
| 378 | return record_batch_with_metadata; |
| 379 | } |
| 380 | |
| 381 | private: |
| 382 | std::shared_ptr<Schema> schema_; |
no test coverage detected