| 670 | std::vector<RecordBatchVector> batches{}; |
| 671 | |
| 672 | void Emplace(const EnumeratedRecordBatch& batch) { |
| 673 | std::lock_guard<std::mutex> lock(mutex); |
| 674 | auto fragment_index = batch.fragment.index; |
| 675 | auto batch_index = batch.record_batch.index; |
| 676 | if (static_cast<int>(batches.size()) <= fragment_index) { |
| 677 | batches.resize(fragment_index + 1); |
| 678 | } |
| 679 | if (static_cast<int>(batches[fragment_index].size()) <= batch_index) { |
| 680 | batches[fragment_index].resize(batch_index + 1); |
| 681 | } |
| 682 | batches[fragment_index][batch_index] = batch.record_batch.value; |
| 683 | } |
| 684 | |
| 685 | RecordBatchVector Finish() { |
| 686 | RecordBatchVector all_batches; |
no test coverage detected