| 346 | class OneShotFragment : public Fragment { |
| 347 | public: |
| 348 | OneShotFragment(std::shared_ptr<Schema> schema, RecordBatchIterator batch_it) |
| 349 | : Fragment(compute::literal(true), std::move(schema)), |
| 350 | batch_it_(std::move(batch_it)) { |
| 351 | DCHECK_NE(given_physical_schema_, nullptr); |
| 352 | } |
| 353 | Status CheckConsumed() { |
| 354 | if (!batch_it_) return Status::Invalid("OneShotFragment was already scanned"); |
| 355 | return Status::OK(); |