private static Tuple transformToTuple(List<?> objList, HCatFieldSchema hfs) throws Exception {
    try {
      return transformToTuple(objList, hfs.getStructSubSchema());
    } catch (Exception e) {
      if (hfs.getType() != Type.STRUCT) {
        throw new Exception("Expected Struct type, got " + hfs.getType(), e);
      } else {
        throw e;
      }
    }
  }
Converts object from Hive's value system to Pig's value system
see HCatBaseStorer#getJavaObj() for Pig->Hive conversion 
@param o object from Hive value system
@return object in Pig value system
hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hive/hcatalog/pig/PigHCatUtil.java