public static boolean isConversionLossy(TypeInfo t1, TypeInfo t2) {
    if (t1 instanceof PrimitiveTypeInfo && t2 instanceof PrimitiveTypeInfo) {
      PrimitiveTypeInfo pt1 = (PrimitiveTypeInfo) t1;
      PrimitiveTypeInfo pt2 = (PrimitiveTypeInfo) t2;
      return LOSSY_TYPE_CONVERSIONS.contains(EnumSet.of(pt1.getPrimitiveCategory(), pt2.getPrimitiveCategory()));
    }
    return false;
  }
Returns true if the conversion between the types is lossy (i.e., it can lead to loss of information), and false
otherwise.
TODO Not all cases are covered 
Note that the method does not imply anything about the coercibility of types; use 
{@link #isConversionRequiredForComparison(TypeInfo, TypeInfo)} to determine if a conversion is possible.
serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java