String schemaName = "union" + Base64.encodeBase64URLSafeString(md.digest()).replace('-', 'x');
Schema schema = Schema.createRecord(schemaName, "", "crunch", false);
schema.setFields(fields);
return new AvroType<Union>(Union.class, schema, new UnionRecordToTuple(ptypes),
new TupleToUnionRecord(schema, ptypes), new UnionDeepCopier(ptypes), null, ptypes);
}