MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / collapseTreeImpl

Function collapseTreeImpl

src/Core/Streaming/CursorTree.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22{
23
24void collapseTreeImpl(std::map<String, Int64> & collapsed_tree, std::vector<String> & path, CursorTreeNode * node)
25{
26 for (const auto & [k, v] : *node)
27 {
28 path.push_back(k);
29
30 if (std::holds_alternative<Int64>(v))
31 collapsed_tree[boost::algorithm::join(path, ".")] = std::get<Int64>(v);
32 else
33 collapseTreeImpl(collapsed_tree, path, std::get<CursorTreeNodePtr>(v).get());
34
35 path.pop_back();
36 }
37}
38
39std::map<String, Int64> collapseTree(CursorTreeNode * node)
40{

Callers 1

collapseTreeFunction · 0.85

Calls 3

push_backMethod · 0.45
getMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected