| 113 | batch_size(batch_size) {} |
| 114 | |
| 115 | std::shared_ptr<RecordBatch> Next() { |
| 116 | const auto& next_parent = fragment->record_batches_[batch_index]; |
| 117 | if (offset < next_parent->num_rows()) { |
| 118 | auto next = next_parent->Slice(offset, batch_size); |
| 119 | offset += batch_size; |
| 120 | return next; |
| 121 | } |
| 122 | batch_index++; |
| 123 | offset = 0; |
| 124 | return nullptr; |
| 125 | } |
| 126 | |
| 127 | bool Finished() { return batch_index >= fragment->record_batches_.size(); } |
| 128 |