MCPcopy Create free account
hub / github.com/apache/arrow / FromNode

Method FromNode

cpp/src/parquet/schema.cc:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71std::shared_ptr<ColumnPath> ColumnPath::FromNode(const Node& node) {
72 // Build the path in reverse order as we traverse the nodes to the top
73 std::vector<std::string> rpath_;
74 const Node* cursor = &node;
75 // The schema node is not part of the ColumnPath
76 while (cursor->parent()) {
77 rpath_.push_back(cursor->name());
78 cursor = cursor->parent();
79 }
80
81 // Build ColumnPath in correct order
82 std::vector<std::string> path(rpath_.crbegin(), rpath_.crend());
83 return std::make_shared<ColumnPath>(std::move(path));
84}
85
86std::shared_ptr<ColumnPath> ColumnPath::extend(const std::string& node_name) const {
87 std::vector<std::string> path;

Callers

nothing calls this directly

Calls 5

push_backMethod · 0.80
crbeginMethod · 0.80
crendMethod · 0.80
parentMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected