| 1582 | } |
| 1583 | |
| 1584 | Status DoPreBufferMetadata(const std::vector<int>& indices) { |
| 1585 | RETURN_NOT_OK(CacheMetadata(indices)); |
| 1586 | RETURN_NOT_OK(EnsureDictionaryReadStarted()); |
| 1587 | Future<> all_metadata_ready = WaitForMetadatas(indices); |
| 1588 | for (int index : indices) { |
| 1589 | Future<std::shared_ptr<Message>> metadata_loaded = |
| 1590 | all_metadata_ready.Then([this, index]() -> Result<std::shared_ptr<Message>> { |
| 1591 | stats_.num_messages.fetch_add(1, std::memory_order_relaxed); |
| 1592 | ARROW_ASSIGN_OR_RAISE(FileBlock block, GetRecordBatchBlock(index)); |
| 1593 | ARROW_ASSIGN_OR_RAISE( |
| 1594 | std::shared_ptr<Buffer> metadata, |
| 1595 | metadata_cache_->Read({block.offset, block.metadata_length})); |
| 1596 | return ReadMessage(std::move(metadata), nullptr); |
| 1597 | }); |
| 1598 | cached_metadata_.emplace(index, metadata_loaded); |
| 1599 | } |
| 1600 | return Status::OK(); |
| 1601 | } |
| 1602 | |
| 1603 | std::vector<int> AllIndices() const { |
| 1604 | std::vector<int> all_indices(num_record_batches()); |
nothing calls this directly
no test coverage detected