| 1185 | } |
| 1186 | |
| 1187 | static ::arrow::Future<RecordBatchGenerator> ReadOneRowGroup( |
| 1188 | ::arrow::internal::Executor* cpu_executor, std::shared_ptr<FileReaderImpl> self, |
| 1189 | const int row_group, const std::vector<int>& column_indices) { |
| 1190 | // Skips bound checks/pre-buffering, since we've done that already |
| 1191 | const int64_t batch_size = self->properties().batch_size(); |
| 1192 | return self->DecodeRowGroups(self, {row_group}, column_indices, cpu_executor) |
| 1193 | .Then([batch_size](const std::shared_ptr<Table>& table) |
| 1194 | -> ::arrow::Result<RecordBatchGenerator> { |
| 1195 | ::arrow::TableBatchReader table_reader(*table); |
| 1196 | table_reader.set_chunksize(batch_size); |
| 1197 | ARROW_ASSIGN_OR_RAISE(auto batches, table_reader.ToRecordBatches()); |
| 1198 | return ::arrow::MakeVectorGenerator(std::move(batches)); |
| 1199 | }); |
| 1200 | } |
| 1201 | |
| 1202 | std::shared_ptr<FileReaderImpl> arrow_reader_; |
| 1203 | ::arrow::internal::Executor* cpu_executor_; |
nothing calls this directly
no test coverage detected