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

Class FieldPosition

cpp/src/arrow/ipc/dictionary.h:38–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace internal {
37
38class FieldPosition {
39 public:
40 FieldPosition() : parent_(NULLPTR), index_(-1), depth_(0) {}
41
42 FieldPosition child(int index) const { return {this, index}; }
43
44 std::vector<int> path() const {
45 std::vector<int> path(depth_);
46 const FieldPosition* cur = this;
47 for (int i = depth_ - 1; i >= 0; --i) {
48 path[i] = cur->index_;
49 cur = cur->parent_;
50 }
51 return path;
52 }
53
54 protected:
55 FieldPosition(const FieldPosition* parent, int index)
56 : parent_(parent), index_(index), depth_(parent->depth_ + 1) {}
57
58 const FieldPosition* parent_;
59 int index_;
60 int depth_;
61};
62
63} // namespace internal
64

Callers 2

ImportSchemaMethod · 0.85
ResolveDictionariesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected