| 286 | } |
| 287 | |
| 288 | ArrowArray ArrowQueryResult::getArray(FactorizedTableIterator& iterator, int64_t chunkSize) { |
| 289 | auto rowBatch = ArrowRowBatch(columnTypes, chunkSize, false /* fallbackExtensionTypes */); |
| 290 | auto rowBatchSize = 0u; |
| 291 | while (rowBatchSize < chunkSize) { |
| 292 | if (!iterator.hasNext()) { |
| 293 | break; |
| 294 | } |
| 295 | (void)iterator.getNext(*tuple); |
| 296 | rowBatch.append(*tuple); |
| 297 | rowBatchSize++; |
| 298 | numTuples++; |
| 299 | } |
| 300 | return rowBatch.toArray(columnTypes); |
| 301 | } |
| 302 | |
| 303 | bool ArrowQueryResult::hasNext() const { |
| 304 | throw NotImplementedException( |
nothing calls this directly
no test coverage detected