private HCatFieldSchema getColFromSchema(String alias, HCatSchema tblSchema) {
    if (tblSchema != null) {
      for (HCatFieldSchema hcatField : tblSchema.getFields()) {
        if (hcatField != null && hcatField.getName() != null && hcatField.getName().equalsIgnoreCase(alias)) {
          return hcatField;
        }
      }
    }
    // Its a new column
    return null;
  }
This method encodes which Pig type can map (be stored in) to which HCat type.
@throws HCatException
@throws FrontendException
hcatalog/hcatalog-pig-adapter/src/main/java/org/apache/hive/hcatalog/pig/HCatBaseStorer.java