public FunctionInfo registerPermanentFunction(String functionName,
      String className, boolean registerToSession, FunctionResource... resources) throws SemanticException {
    FunctionInfo function = new FunctionInfo(functionName, className, resources);
    // register to session first for backward compatibility
    if (registerToSession) {
      String qualifiedName = FunctionUtils.qualifyFunctionName(
          functionName, SessionState.get().getCurrentDatabase().toLowerCase());
      FunctionInfo newFunction = registerToSessionRegistry(qualifiedName, function);
      if (newFunction != null) {
        addFunction(functionName, function);
        return newFunction;
      }
    } else {
        addFunction(functionName, function);
    }
    return null;
  }
Registers the UDF class as a built-in function; used for dynamically created UDFs, like
GenericUDFOP*Minus/Plus.
ql/src/java/org/apache/hadoop/hive/ql/exec/Registry.java