void gatherUserSuppliedFunctions(ASTNode ast) throws SemanticException {
    int tokenType = ast.getToken().getType();
    if (tokenType == HiveParser.TOK_FUNCTION ||
            tokenType == HiveParser.TOK_FUNCTIONDI ||
            tokenType == HiveParser.TOK_FUNCTIONSTAR) {
      if (ast.getChild(0).getType() == HiveParser.Identifier) {
        try {
          String functionName = unescapeIdentifier(ast.getChild(0).getText()).toLowerCase();
          String[] qualifiedFunctionName = FunctionUtils.getQualifiedFunctionNameParts(functionName);
          this.userSuppliedFunctions.add(qualifiedFunctionName[0]+"."+qualifiedFunctionName[1]);
        } catch (HiveException ex) {
          throw new SemanticException(ex.getMessage(), ex);
        }
      }
    }
    for (int i = 0; i < ast.getChildCount();i++) {
      gatherUserSuppliedFunctions((ASTNode) ast.getChild(i));
    }
  }
Planner specific stuff goes in here.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java