| 2031 | } |
| 2032 | |
| 2033 | Future<std::shared_ptr<Message>> WholeIpcFileRecordBatchGenerator::ReadBlock( |
| 2034 | const FileBlock& block) { |
| 2035 | if (cached_source_) { |
| 2036 | auto cached_source = cached_source_; |
| 2037 | io::ReadRange range{block.offset, block.metadata_length + block.body_length}; |
| 2038 | auto pool = state_->options_.memory_pool; |
| 2039 | return cached_source->WaitFor({range}).Then( |
| 2040 | [cached_source, pool, range]() -> Result<std::shared_ptr<Message>> { |
| 2041 | ARROW_ASSIGN_OR_RAISE(auto buffer, cached_source->Read(range)); |
| 2042 | io::BufferReader stream(std::move(buffer)); |
| 2043 | return ReadMessage(&stream, pool); |
| 2044 | }); |
| 2045 | } else { |
| 2046 | return ReadMessageFromBlockAsync(block, state_->file_, io_context_); |
| 2047 | } |
| 2048 | } |
| 2049 | |
| 2050 | Result<std::shared_ptr<RecordBatch>> WholeIpcFileRecordBatchGenerator::ReadRecordBatch( |
| 2051 | RecordBatchFileReaderImpl* state, Message* message) { |
nothing calls this directly
no test coverage detected