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

Method FromNode

cpp/src/parquet/schema.cc:70–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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