@Override
    public int compareTo(DataType rhs) {
        int cmp = super.compareTo(rhs);
        return (cmp != 0) ? cmp : compareTargetType(rhs);
    }
Creates a new type where the numeric ID is based on the hash of targetType
document/src/main/java/com/yahoo/document/ReferenceDataType.java