public static int compare(Object o1, Object o2) {

    return compare(o1, o2, findType(o1), findType(o2));
  }
Determine the datatype of an object.
@param o Object to test.
@return byte code of the type, or ERROR if we don't know.
hcatalog/core/src/main/java/org/apache/hive/hcatalog/data/DataType.java