| 1597 | } |
| 1598 | |
| 1599 | Status DoPreBufferMetadata(const std::vector<int>& indices) { |
| 1600 | RETURN_NOT_OK(CacheMetadata(indices)); |
| 1601 | RETURN_NOT_OK(EnsureDictionaryReadStarted()); |
| 1602 | Future<> all_metadata_ready = WaitForMetadatas(indices); |
| 1603 | for (int index : indices) { |
| 1604 | Future<std::shared_ptr<Message>> metadata_loaded = |
| 1605 | all_metadata_ready.Then([this, index]() -> Result<std::shared_ptr<Message>> { |
| 1606 | stats_.num_messages.fetch_add(1, std::memory_order_relaxed); |
| 1607 | ARROW_ASSIGN_OR_RAISE(FileBlock block, GetRecordBatchBlock(index)); |
| 1608 | ARROW_ASSIGN_OR_RAISE( |
| 1609 | std::shared_ptr<Buffer> metadata, |
| 1610 | metadata_cache_->Read({block.offset, block.metadata_length})); |
| 1611 | return ReadMessage(std::move(metadata), nullptr); |
| 1612 | }); |
| 1613 | cached_metadata_.emplace(index, metadata_loaded); |
| 1614 | } |
| 1615 | return Status::OK(); |
| 1616 | } |
| 1617 | |
| 1618 | std::vector<int> AllIndices() const { |
| 1619 | std::vector<int> all_indices(num_record_batches()); |
nothing calls this directly
no test coverage detected