MCPcopy Create free account
hub / github.com/bytedance/bolt / newQueryCtx

Function newQueryCtx

bolt/exec/tests/utils/ArbitratorTestUtil.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace bytedance::bolt::exec::test {
40
41std::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
60std::unique_ptr<memory::MemoryManager> createMemoryManager(
61 int64_t arbitratorCapacity,

Callers 5

DEBUG_ONLY_TEST_FFunction · 0.85
TEST_FFunction · 0.85
DEBUG_ONLY_TEST_FFunction · 0.85
DEBUG_ONLY_TEST_PFunction · 0.85
TEST_PFunction · 0.85

Calls 3

addRootPoolMethod · 0.80
createFunction · 0.50
QueryConfigClass · 0.50

Tested by

no test coverage detected