private static void serializeUnion(RandomAccessOutput byteStream, Object obj,
    UnionObjectInspector uoi, BooleanRef warnedOnceNullMapKey) throws SerDeException {
    byte tag = uoi.getTag(obj);
    byteStream.write(tag);
    serialize(byteStream, uoi.getField(obj), uoi.getObjectInspectors().get(tag), false, warnedOnceNullMapKey);
  }
Serialize a struct object without writing the byte size. This function is
shared by both row serialization and struct serialization.

@param byteStream
         the byte stream storing the serialization data
@param fieldData
         the struct object to serialize
@param fieldOis
         the struct object inspector
@param warnedOnceNullMapKey a boolean indicating whether a warning
         has been issued once already when encountering null map keys
serde/src/java/org/apache/hadoop/hive/serde2/lazybinary/LazyBinarySerDe.java