[[arrow::export]]
| 268 | |
| 269 | // [[arrow::export]] |
| 270 | std::shared_ptr<arrow::Table> Table__from_RecordBatchFileReader( |
| 271 | const std::shared_ptr<arrow::ipc::RecordBatchFileReader>& reader) { |
| 272 | // RecordBatchStreamReader inherits from RecordBatchReader |
| 273 | // but RecordBatchFileReader apparently does not |
| 274 | int num_batches = reader->num_record_batches(); |
| 275 | std::vector<std::shared_ptr<arrow::RecordBatch>> batches(num_batches); |
| 276 | for (int i = 0; i < num_batches; i++) { |
| 277 | batches[i] = ValueOrStop(reader->ReadRecordBatch(i)); |
| 278 | } |
| 279 | |
| 280 | return ValueOrStop(arrow::Table::FromRecordBatches(std::move(batches))); |
| 281 | } |
| 282 | |
| 283 | // [[arrow::export]] |
| 284 | cpp11::list ipc___RecordBatchFileReader__batches( |
no test coverage detected