public static String[] splitQualifiedFunctionName(String functionName) throws HiveException {
    String[] names = functionName.split("\\.");
    if (names.length == 1) {
      String[] retval = { null, functionName };
      return retval;
    } else if (names.length > 2) {
      throw new HiveException("Function name does not have correct format: " + functionName);
    }
    // Remove the WINDOW_FUNC_PREFIX prefix, as that is not part of the database name.
    if (names[0].startsWith(Registry.WINDOW_FUNC_PREFIX)) {
      names[0] = names[0].substring(Registry.WINDOW_FUNC_PREFIX.length());
    }
    return names;
  }
Splits a qualified function name into an array containing the database name and function name.
If the name is not qualified, the database name is null.
If there is more than one '.', an exception will be thrown.
@param functionName Function name, which may or may not be qualified
@return
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionUtils.java