public static RexNode genRexNode(ASTNode expr, RowResolver input,
      TypeCheckCtx tcCtx, HiveConf conf) throws SemanticException {
    RexNode cached = null;
    if (tcCtx.isUseCaching()) {
      cached = getRexNodeCached(expr, input, tcCtx);
    }
    if (cached == null) {
      Map<ASTNode, RexNode> allExprs = genAllRexNode(expr, input, tcCtx, conf);
      return allExprs.get(expr);
    }
    return cached;
  }
Returns a Calcite {@link RexNode} for the expression.
If it is evaluated already in previous operator, it can be retrieved from cache.
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java