public static String getFunctionText(ASTNode expr, boolean isFunction) {
    String funcText = null;
    if (!isFunction) {
      // For operator, the function name is the operator text, unless it's in
      // our special dictionary
      if (expr.getChildCount() == 1) {
        funcText = SPECIAL_UNARY_OPERATOR_TEXT_MAP.get(expr.getType());
      }
      if (funcText == null) {
        funcText = expr.getText();
      }
    } else {
      // For TOK_FUNCTION, the function name is stored in the first child,
      // unless it's in our
      // special dictionary.
      assert (expr.getChildCount() >= 1);
      int funcType = ((ASTNode) expr.getChild(0)).getType();
      if (funcText == null) {
        funcText = CONVERSION_FUNCTION_TEXT_MAP.get(funcType);
      }
      if (funcText == null) {
        funcText = ((ASTNode) expr.getChild(0)).getText();
      }
    }
    return BaseSemanticAnalyzer.unescapeIdentifier(funcText);
  }
Function to do groupby subexpression elimination. This is called by all the
processors initially. As an example, consider the query select a+b,
count(1) from T group by a+b; Then a+b is already precomputed in the group
by operators key, so we substitute a+b in the select list with the internal
column name of the a+b expression that appears in the in input row
resolver.

@param nd      The node that is being inspected.
@param procCtx The processor context.
@return exprNodeColumnDesc.
ql/src/java/org/apache/hadoop/hive/ql/parse/type/TypeCheckProcFactory.java