@Override
    public int hashCode() {
      return ObjectInspectorUtils.getBucketHashCodeOld(objects, oi);
    }
This class can be used to wrap Hive objects and put in HashMap or HashSet.
The objects will be compared using ObjectInspectors.
serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java