| 2046 | } |
| 2047 | |
| 2048 | Future<std::shared_ptr<Message>> WholeIpcFileRecordBatchGenerator::ReadBlock( |
| 2049 | const FileBlock& block) { |
| 2050 | if (cached_source_) { |
| 2051 | auto cached_source = cached_source_; |
| 2052 | io::ReadRange range{block.offset, block.metadata_length + block.body_length}; |
| 2053 | auto pool = state_->options_.memory_pool; |
| 2054 | return cached_source->WaitFor({range}).Then( |
| 2055 | [cached_source, pool, range]() -> Result<std::shared_ptr<Message>> { |
| 2056 | ARROW_ASSIGN_OR_RAISE(auto buffer, cached_source->Read(range)); |
| 2057 | io::BufferReader stream(std::move(buffer)); |
| 2058 | return ReadMessage(&stream, pool); |
| 2059 | }); |
| 2060 | } else { |
| 2061 | return ReadMessageFromBlockAsync(block, state_->file_, io_context_); |
| 2062 | } |
| 2063 | } |
| 2064 | |
| 2065 | Result<std::shared_ptr<RecordBatch>> WholeIpcFileRecordBatchGenerator::ReadRecordBatch( |
| 2066 | RecordBatchFileReaderImpl* state, Message* message) { |
nothing calls this directly
no test coverage detected