| 59 | } |
| 60 | |
| 61 | std::shared_ptr<Task> makeTask( |
| 62 | const std::string& taskId, |
| 63 | const core::PlanNodePtr& planNode, |
| 64 | int destination = 0, |
| 65 | Consumer consumer = nullptr, |
| 66 | int64_t maxMemory = memory::kMaxMemory) { |
| 67 | auto configCopy = configSettings_; |
| 68 | auto queryCtx = core::QueryCtx::create( |
| 69 | executor_.get(), core::QueryConfig(std::move(configCopy))); |
| 70 | |
| 71 | queryCtx->testingOverrideMemoryPool(memory::memoryManager()->addRootPool( |
| 72 | queryCtx->queryId(), maxMemory, MemoryReclaimer::create())); |
| 73 | core::PlanFragment planFragment{planNode}; |
| 74 | return Task::create( |
| 75 | taskId, |
| 76 | std::move(planFragment), |
| 77 | destination, |
| 78 | std::move(queryCtx), |
| 79 | Task::ExecutionMode::kParallel, |
| 80 | std::move(consumer)); |
| 81 | } |
| 82 | |
| 83 | exec::Split remoteSplit(const std::string& taskId) { |
| 84 | return exec::Split(std::make_shared<RemoteConnectorSplit>(taskId)); |
nothing calls this directly
no test coverage detected