| 1397 | } |
| 1398 | |
| 1399 | Future<std::shared_ptr<RecordBatch>> ReadRecordBatchAsync(int i) { |
| 1400 | DCHECK_GE(i, 0); |
| 1401 | DCHECK_LT(i, num_record_batches()); |
| 1402 | |
| 1403 | auto cached_metadata = cached_metadata_.find(i); |
| 1404 | if (cached_metadata != cached_metadata_.end()) { |
| 1405 | return ReadCachedRecordBatch(i, cached_metadata->second); |
| 1406 | } |
| 1407 | |
| 1408 | return Status::Invalid( |
| 1409 | "Asynchronous record batch reading is only supported after a call to " |
| 1410 | "PreBufferMetadata or PreBufferBatches"); |
| 1411 | } |
| 1412 | |
| 1413 | Result<std::shared_ptr<RecordBatch>> ReadRecordBatch(int i) override { |
| 1414 | ARROW_ASSIGN_OR_RAISE(auto batch_with_metadata, ReadRecordBatchWithCustomMetadata(i)); |
no test coverage detected