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

Method Visit

cpp/src/gandiva/expr_decomposer.cc:39–51  ·  view source on GitHub ↗

Decompose a field node - simply separate out validity & value arrays.

Source from the content-addressed store, hash-verified

37
38// Decompose a field node - simply separate out validity & value arrays.
39Status ExprDecomposer::Visit(const FieldNode& node) {
40 auto desc = annotator_.CheckAndAddInputFieldDescriptor(node.field());
41
42 DexPtr validity_dex = std::make_shared<VectorReadValidityDex>(desc);
43 DexPtr value_dex;
44 if (desc->HasOffsetsIdx()) {
45 value_dex = std::make_shared<VectorReadVarLenValueDex>(desc);
46 } else {
47 value_dex = std::make_shared<VectorReadFixedLenValueDex>(desc);
48 }
49 result_ = std::make_shared<ValueValidityPair>(validity_dex, value_dex);
50 return Status::OK();
51}
52
53// Try and optimize a function node, by substituting with cheaper alternatives.
54// eg. replacing 'like' with 'starts_with' can save function calls at evaluation

Callers

nothing calls this directly

Calls 15

resultFunction · 0.85
HasOffsetsIdxMethod · 0.80
LookupSignatureMethod · 0.80
push_backMethod · 0.80
AddHolderPointerMethod · 0.80
then_nodeMethod · 0.80
else_nodeMethod · 0.80
is_nullMethod · 0.80
OKFunction · 0.50
ARROW_ASSIGN_OR_RAISEFunction · 0.50
fieldMethod · 0.45

Tested by

no test coverage detected