| 223 | } |
| 224 | |
| 225 | Result<Future<>> operator()() override { |
| 226 | // Prevent concurrent calls to ScanBatch which might not be thread safe |
| 227 | std::lock_guard<std::mutex> lk(scan_->mutex); |
| 228 | return scan_->fragment_scanner->ScanBatch(batch_index_) |
| 229 | .Then([this](const std::shared_ptr<RecordBatch>& batch) { |
| 230 | return HandleBatch(batch); |
| 231 | }); |
| 232 | } |
| 233 | |
| 234 | std::string_view name() const override { return name_; } |
| 235 |