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

Method EncodeConjunctionMembers

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

Encode an expression (recursively breaking up conjunction members if possible).

Source from the content-addressed store, hash-verified

90
91 // Encode an expression (recursively breaking up conjunction members if possible).
92 void EncodeConjunctionMembers(const compute::Expression& expr,
93 expression_codes* codes) {
94 if (auto call = expr.call()) {
95 if (call->function_name == "and_kleene") {
96 // expr is a conjunction, encode its arguments
97 EncodeConjunctionMembers(call->arguments[0], codes);
98 EncodeConjunctionMembers(call->arguments[1], codes);
99 return;
100 }
101 }
102 // expr is not a conjunction, encode it whole
103 codes->push_back(GetOrInsert(expr));
104 }
105
106 // Convert an encoded subtree or guarantee back into an expression.
107 compute::Expression GetSubtreeExpression(const Encoded& encoded_subtree) {

Callers 1

TESTFunction · 0.80

Calls 3

GetOrInsertFunction · 0.85
callMethod · 0.80
push_backMethod · 0.80

Tested by 1

TESTFunction · 0.64