@Test
  public void testPrintTypeCompatibility() {
    if (true) {
      return;
    }

    String[] typeStrings = {
        "void", "boolean", "tinyint", "smallint", "int", "bigint", "float", "double",
        "string", "timestamp", "date", "binary", "decimal", "varchar(10)", "varchar(5)",
    };
    for (String cat1 : typeStrings) {
      TypeInfo ti1 = null;
      try {
        ti1 = TypeInfoUtils.getTypeInfoFromTypeString(cat1);
      } catch (Exception err) {
        System.out.println(err);
        System.out.println("Unable to get TypeInfo for " + cat1 + ", skipping ...");
        continue;
      }

      for (String cat2 : typeStrings) {
        TypeInfo commonClass = null;
        boolean implicitConvertable = false;
        try {
          TypeInfo ti2 = TypeInfoUtils.getTypeInfoFromTypeString(cat2);
          try {
            commonClass = FunctionRegistry.getCommonClassForComparison(ti1, ti2);
            //implicitConvertable = FunctionRegistry.implicitConvertable(ti1, ti2);
          } catch (Exception err) {
            System.out.println("Failed to get common class for " + ti1 + ", " + ti2 + ": " + err);
            err.printStackTrace();
            //System.out.println("Unable to get TypeInfo for " + cat2 + ", skipping ...");
          }
          System.out.println(cat1 + " - " + cat2 + ": " + commonClass);
          //System.out.println(cat1 + " - " + cat2 + ": " + implicitConvertable);
        } catch (Exception err) {
          System.out.println(err);
          System.out.println("Unable to get TypeInfo for " + cat2 + ", skipping ...");
          continue;
        }
      }
    }
  }
Method to print out the comparison/conversion behavior for data types.
ql/src/test/org/apache/hadoop/hive/ql/exec/TestFunctionRegistry.java