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