@Test
  public void testIsPermanentFunction() throws Exception {
    // Setup exprNode
    GenericUDF udf = new GenericUDFCurrentTimestamp();
    List<ExprNodeDesc> children = new ArrayList<ExprNodeDesc>();
    ExprNodeGenericFuncDesc fnExpr =
        new ExprNodeGenericFuncDesc(TypeInfoFactory.timestampTypeInfo, udf, children);

    assertFalse("Function not added as permanent yet", FunctionRegistry.isPermanentFunction(fnExpr));

    // Now register as permanent function
    FunctionResource[] emptyResources = new FunctionResource[] {};
    FunctionRegistry.registerPermanentFunction("default.perm_current_timestamp",
        GenericUDFCurrentTimestamp.class.getName(), true, emptyResources);

    assertTrue("Function should now be recognized as permanent function", FunctionRegistry.isPermanentFunction(fnExpr));
  }
Method to print out the comparison/conversion behavior for data types.
ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java