| 81 | } |
| 82 | |
| 83 | std::shared_ptr<Task> makeTask( |
| 84 | const std::string& taskId, |
| 85 | const core::PlanNodePtr& planNode, |
| 86 | int destination = 0, |
| 87 | Consumer consumer = nullptr, |
| 88 | int64_t maxMemory = memory::kMaxMemory) const { |
| 89 | auto configCopy = configSettings_; |
| 90 | auto queryCtx = core::QueryCtx::create( |
| 91 | executor_.get(), core::QueryConfig(std::move(configCopy))); |
| 92 | queryCtx->testingOverrideMemoryPool(memory::memoryManager()->addRootPool( |
| 93 | queryCtx->queryId(), maxMemory, MemoryReclaimer::create())); |
| 94 | core::PlanFragment planFragment{planNode}; |
| 95 | return Task::create( |
| 96 | taskId, |
| 97 | std::move(planFragment), |
| 98 | destination, |
| 99 | std::move(queryCtx), |
| 100 | Task::ExecutionMode::kParallel, |
| 101 | std::move(consumer)); |
| 102 | } |
| 103 | |
| 104 | std::shared_ptr<Task> makeTask( |
| 105 | const std::string& taskId, |
nothing calls this directly
no test coverage detected