Skip to content

Commit

Permalink
TaskCursor use global memory pool (oap-project#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma authored Jun 21, 2022
1 parent a4f1d93 commit e3cafcd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cpp/velox/compute/VeloxPlanConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,13 @@ class VeloxPlanConverter::WholeStageResIterFirstStage : public WholeStageResIter
splits_.emplace_back(exec::Split(folly::copy(connectorSplit), -1));
}
params_.planNode = planNode;
params_.queryCtx = std::make_shared<core::QueryCtx>(
pool,
std::make_shared<folly::CPUThreadPoolExecutor>(
std::thread::hardware_concurrency()),
std::make_shared<core::MemConfig>(),
std::unordered_map<std::string, std::shared_ptr<Config>>{},
memory::MappedMemory::getInstance());
cursor_ = std::make_unique<test::TaskCursor>(params_);
addSplits_ = [&](Task* task) {
if (noMoreSplits_) {
Expand Down Expand Up @@ -411,6 +418,13 @@ class VeloxPlanConverter::WholeStageResIterMiddleStage : public WholeStageResIte
const bool fakeArrowOutput)
: WholeStageResIter(pool, planNode) {
params_.planNode = planNode;
params_.queryCtx = std::make_shared<core::QueryCtx>(
pool,
std::make_shared<folly::CPUThreadPoolExecutor>(
std::thread::hardware_concurrency()),
std::make_shared<core::MemConfig>(),
std::unordered_map<std::string, std::shared_ptr<Config>>{},
memory::MappedMemory::getInstance());
cursor_ = std::make_unique<test::TaskCursor>(params_);
addSplits_ = [&](Task* task) {
if (noMoreSplits_) {
Expand Down

0 comments on commit e3cafcd

Please sign in to comment.