@Test
  public void testRegisterPermanentFunction() throws Exception {
    FunctionResource[] emptyResources = new FunctionResource[] {};

    // UDF
    FunctionRegistry.registerPermanentFunction("perm_ln", UDFLn.class.getName(), true, emptyResources);
    FunctionInfo functionInfo = FunctionRegistry.getFunctionInfo("perm_ln");
    assertTrue(functionInfo.isPersistent());
    assertTrue(functionInfo.isNative());
    assertFalse(functionInfo.isBuiltIn());
    functionInfo = FunctionRegistry.getFunctionInfo("default.perm_ln");
    assertTrue(functionInfo.isPersistent());
    assertTrue(functionInfo.isNative());
    assertFalse(functionInfo.isBuiltIn());

    // GenericUDF
    FunctionRegistry.registerPermanentFunction("default.perm_concat",
        GenericUDFConcat.class.getName(), true, emptyResources);
    functionInfo = FunctionRegistry.getFunctionInfo("default.perm_concat");
    assertTrue(functionInfo.isPersistent());
    assertTrue(functionInfo.isNative());
    assertFalse(functionInfo.isBuiltIn());

    // GenericUDAF
    FunctionRegistry.registerPermanentFunction("default.perm_max",
        GenericUDAFMax.class.getName(), true, emptyResources);
    functionInfo = FunctionRegistry.getFunctionInfo("default.perm_max");
    assertTrue(functionInfo.isPersistent());
    functionInfo = FunctionRegistry.getWindowFunctionInfo("default.perm_max");
    assertTrue(functionInfo.isPersistent());
    assertTrue(functionInfo.isNative());
    assertFalse(functionInfo.isBuiltIn());

    // UDTF
    FunctionRegistry.registerPermanentFunction("default.perm_explode",
        GenericUDTFExplode.class.getName(), true, emptyResources);
    functionInfo = FunctionRegistry.getFunctionInfo("default.perm_explode");
    assertTrue(functionInfo.isPersistent());
    assertTrue(functionInfo.isNative());
    assertFalse(functionInfo.isBuiltIn());
  }
Method to print out the comparison/conversion behavior for data types.
ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java