| 1412 | } |
| 1413 | |
| 1414 | Future<std::shared_ptr<RecordBatch>> ReadRecordBatchAsync(int i) { |
| 1415 | DCHECK_GE(i, 0); |
| 1416 | DCHECK_LT(i, num_record_batches()); |
| 1417 | |
| 1418 | auto cached_metadata = cached_metadata_.find(i); |
| 1419 | if (cached_metadata != cached_metadata_.end()) { |
| 1420 | return ReadCachedRecordBatch(i, cached_metadata->second); |
| 1421 | } |
| 1422 | |
| 1423 | return Status::Invalid( |
| 1424 | "Asynchronous record batch reading is only supported after a call to " |
| 1425 | "PreBufferMetadata or PreBufferBatches"); |
| 1426 | } |
| 1427 | |
| 1428 | Result<std::shared_ptr<RecordBatch>> ReadRecordBatch(int i) override { |
| 1429 | ARROW_ASSIGN_OR_RAISE(auto batch_with_metadata, ReadRecordBatchWithCustomMetadata(i)); |
no test coverage detected