| 3413 | } |
| 3414 | |
| 3415 | Status ScheduleTaskCallback(std::function<Status(size_t)> func) { |
| 3416 | if (finished_generating_.load()) return Status::OK(); |
| 3417 | plan_->query_context()->ScheduleTask( |
| 3418 | [this, func](size_t thread_index) { |
| 3419 | Status status = func(thread_index); |
| 3420 | if (!status.ok()) { |
| 3421 | ARROW_RETURN_NOT_OK(StopProducing()); |
| 3422 | } |
| 3423 | return status; |
| 3424 | }, |
| 3425 | "TpchNode::GenerateAndProcessBatch"); |
| 3426 | return Status::OK(); |
| 3427 | } |
| 3428 | |
| 3429 | const char* name_; |
| 3430 | std::unique_ptr<TpchTableGenerator> generator_; |
no test coverage detected