public ExprNodeEvaluator getEvaluated(ExprNodeEvaluator eval) {
      ExprNodeDesc.ExprNodeDescEqualityWrapper key =
          new ExprNodeDesc.ExprNodeDescEqualityWrapper(eval.expr);
      ExprNodeEvaluator prev = cached.get(key);
      if (prev == null) {
        cached.put(key, eval);
        return null;
      }
      hasReference = true;
      return new ExprNodeEvaluatorRef(prev);
    }
Should be called before eval is initialized
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeEvaluatorFactory.java