| 39 | namespace bytedance::bolt::exec::test { |
| 40 | |
| 41 | std::shared_ptr<core::QueryCtx> newQueryCtx( |
| 42 | MemoryManager* memoryManager, |
| 43 | folly::Executor* executor, |
| 44 | int64_t memoryCapacity, |
| 45 | const std::string& queryId) { |
| 46 | std::unordered_map<std::string, std::shared_ptr<config::ConfigBase>> configs; |
| 47 | std::shared_ptr<MemoryPool> pool = |
| 48 | memoryManager->addRootPool("", memoryCapacity); |
| 49 | auto queryCtx = core::QueryCtx::create( |
| 50 | executor, |
| 51 | core::QueryConfig({}), |
| 52 | configs, |
| 53 | cache::AsyncDataCache::getInstance(), |
| 54 | std::move(pool), |
| 55 | nullptr, |
| 56 | queryId); |
| 57 | return queryCtx; |
| 58 | } |
| 59 | |
| 60 | std::unique_ptr<memory::MemoryManager> createMemoryManager( |
| 61 | int64_t arbitratorCapacity, |
no test coverage detected