public static List<TypeInfo> generateColumnTypes(Schema schema,
      Set<Schema> seenSchemas) throws AvroSerdeException {
    List<Schema.Field> fields = schema.getFields();

    List<TypeInfo> types = new ArrayList<TypeInfo>(fields.size());

    for (Schema.Field field : fields) {
      types.add(generateTypeInfo(field.schema(), seenSchemas));
    }

    return types;
  }
Generate a list of of TypeInfos from an Avro schema.  This method is
currently public due to some weirdness in deserializing unions, but
will be made private once that is resolved.
@param schema Schema to generate field types for
@param seenSchemas stores schemas processed in the parsing done so far,
        helping to resolve circular references in the schema
@return List of TypeInfos, each element of which is a TypeInfo derived
        from the schema.
@throws AvroSerdeException for problems during conversion.
serde/src/java/org/apache/hadoop/hive/serde2/avro/SchemaToTypeInfo.java