| 1855 | }; |
| 1856 | |
| 1857 | Future<std::shared_ptr<RecordBatch>> ReadCachedRecordBatch( |
| 1858 | int index, Future<std::shared_ptr<Message>> message_fut) { |
| 1859 | stats_.num_record_batches.fetch_add(1, std::memory_order_relaxed); |
| 1860 | return dictionary_load_finished_.Then([message_fut] { return message_fut; }) |
| 1861 | .Then([this, index](const std::shared_ptr<Message>& message_obj) |
| 1862 | -> Future<std::shared_ptr<RecordBatch>> { |
| 1863 | ARROW_ASSIGN_OR_RAISE(auto block, GetRecordBatchBlock(index)); |
| 1864 | ARROW_ASSIGN_OR_RAISE(auto message, GetFlatbufMessage(message_obj)); |
| 1865 | ARROW_ASSIGN_OR_RAISE(auto batch, GetBatchFromMessage(message)); |
| 1866 | ARROW_ASSIGN_OR_RAISE(auto context, GetIpcReadContext(message, batch)); |
| 1867 | |
| 1868 | auto read_context = std::make_shared<CachedRecordBatchReadContext>( |
| 1869 | schema_, batch, std::move(context), file_, owned_file_, |
| 1870 | block.offset + static_cast<int64_t>(block.metadata_length), |
| 1871 | block.body_length); |
| 1872 | RETURN_NOT_OK(read_context->CalculateLoadRequest()); |
| 1873 | return read_context->ReadAsync().Then( |
| 1874 | [read_context] { return read_context->CreateRecordBatch(); }); |
| 1875 | }); |
| 1876 | } |
| 1877 | |
| 1878 | Status ReadFooter() { |
| 1879 | auto fut = ReadFooterAsync(/*executor=*/nullptr); |
nothing calls this directly
no test coverage detected