Try and optimize a function node, by substituting with cheaper alternatives. eg. replacing 'like' with 'starts_with' can save function calls at evaluation time.
| 54 | // eg. replacing 'like' with 'starts_with' can save function calls at evaluation |
| 55 | // time. |
| 56 | const FunctionNode ExprDecomposer::TryOptimize(const FunctionNode& node) { |
| 57 | if (node.descriptor()->name() == "like") { |
| 58 | return LikeHolder::TryOptimize(node); |
| 59 | } else { |
| 60 | return node; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // Decompose a field node - wherever possible, merge the validity vectors of the |
| 65 | // child nodes. |