static.
| 246 | |
| 247 | // static. |
| 248 | std::shared_ptr<Task> Task::create( |
| 249 | const std::string& taskId, |
| 250 | core::PlanFragment planFragment, |
| 251 | int destination, |
| 252 | std::shared_ptr<core::QueryCtx> queryCtx, |
| 253 | ExecutionMode mode, |
| 254 | Consumer consumer, |
| 255 | int32_t memoryArbitrationPriority, |
| 256 | std::optional<common::SpillDiskOptions> spillDiskOpts, |
| 257 | std::function<void(std::exception_ptr)> onError) { |
| 258 | return Task::create( |
| 259 | taskId, |
| 260 | std::move(planFragment), |
| 261 | destination, |
| 262 | std::move(queryCtx), |
| 263 | mode, |
| 264 | (consumer ? [c = std::move(consumer)]() { return c; } |
| 265 | : ConsumerSupplier{}), |
| 266 | memoryArbitrationPriority, |
| 267 | std::move(spillDiskOpts), |
| 268 | std::move(onError)); |
| 269 | } |
| 270 | |
| 271 | std::shared_ptr<Task> Task::create( |
| 272 | const std::string& taskId, |
no test coverage detected