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

Method GenerateSubtrees

cpp/src/arrow/dataset/subtree_internal.h:115–123  ·  view source on GitHub ↗

Insert subtrees for each component of an encoded partition expression.

Source from the content-addressed store, hash-verified

113
114 // Insert subtrees for each component of an encoded partition expression.
115 void GenerateSubtrees(expression_codes guarantee, std::vector<Encoded>* encoded) {
116 while (!guarantee.empty()) {
117 if (subtree_exprs_.insert(guarantee).second) {
118 Encoded encoded_subtree{/*index=*/std::nullopt, guarantee};
119 encoded->push_back(std::move(encoded_subtree));
120 }
121 guarantee.resize(guarantee.size() - 1);
122 }
123 }
124
125 // Encode a guarantee, and generate subtrees for it as well.
126 void EncodeOneGuarantee(int index, const Expression& guarantee,

Callers

nothing calls this directly

Calls 5

push_backMethod · 0.80
resizeMethod · 0.80
emptyMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected