private static TypeInfo generateUnionTypeInfo(Schema schema,
      Set<Schema> seenSchemas) throws AvroSerdeException {
    assert schema.getType().equals(Schema.Type.UNION);
    List<Schema> types = schema.getTypes();


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

    for(Schema type : types) {
      typeInfos.add(generateTypeInfo(type, seenSchemas));
    }

    return TypeInfoFactory.getUnionTypeInfo(typeInfos);
  }
Generate a TypeInfo for an Avro Map.  This is made slightly simpler in that
Avro only allows maps with strings for keys.
serde/src/java/org/apache/hadoop/hive/serde2/avro/SchemaToTypeInfo.java