private static HCatSchema constructHCatSchema(StructTypeInfo stypeInfo) throws HCatException {
    CollectionBuilder builder = getStructSchemaBuilder();
    for (String fieldName : stypeInfo.getAllStructFieldNames()) {
      builder.addField(getHCatFieldSchema(fieldName, stypeInfo.getStructFieldTypeInfo(fieldName), null));
    }
    return builder.build();
  }
Convert a HCatFieldSchema to a FieldSchema
@param fs FieldSchema to convert
@return HCatFieldSchema representation of FieldSchema
@throws HCatException
hcatalog/core/src/main/java/org/apache/hive/hcatalog/data/schema/HCatSchemaUtils.java