private static ExprNodeEvaluator iterate(ExprNodeEvaluator eval, EvaluatorContext context) {
    if (!(eval instanceof ExprNodeConstantEvaluator) && eval.isConsistentWithinQuery()) {
      ExprNodeEvaluator replace = context.getEvaluated(eval);
      if (replace != null) {
        return replace;
      }
    }
    ExprNodeEvaluator[] children = eval.getChildren();
    if (children != null && children.length > 0) {
      for (int i = 0; i < children.length; i++) {
        ExprNodeEvaluator replace = iterate(children[i], context);
        if (replace != null) {
          children[i] = replace;
        }
      }
    }
    return null;
  }
Should be called before eval is initialized
ql/src/java/org/apache/hadoop/hive/ql/exec/ExprNodeEvaluatorFactory.java