Decompose a field node - simply separate out validity & value arrays.
| 37 | |
| 38 | // Decompose a field node - simply separate out validity & value arrays. |
| 39 | Status 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 |
nothing calls this directly
no test coverage detected