}
}
return;
case UNION:
separator = (char) separators[level];
UnionObjectInspector uoi = (UnionObjectInspector) objInspector;
List<? extends ObjectInspector> ois = uoi.getObjectInspectors();
if (ois == null) {
out.write(nullSequence.getBytes(), 0, nullSequence.getLength());
} else {
LazyUtils.writePrimitiveUTF8(out, new Byte(uoi.getTag(obj)),
PrimitiveObjectInspectorFactory.javaByteObjectInspector,
escaped, escapeChar, needsEscape);
out.write(separator);
serialize(out, uoi.getField(obj), ois.get(uoi.getTag(obj)),
separators, level + 1, nullSequence, escaped, escapeChar,
needsEscape);
}
return;
default: