public ObjectInspector getOutputObjectInspector() throws HiveException {
try {
if (work.getTblDir() != null) {
TableDesc tbl = work.getTblDesc();
Deserializer serde = tbl.getDeserializerClass().newInstance();
serde.initialize(job, tbl.getProperties());
return serde.getObjectInspector();
} else if (work.getPartDesc() != null) {
List<PartitionDesc> listParts = work.getPartDesc();
if(listParts.size() == 0) {
return null;
}
currPart = listParts.get(0);
serde = currPart.getTableDesc().getDeserializerClass().newInstance();
serde.initialize(job, currPart.getTableDesc().getProperties());
setPrtnDesc();
currPart = null;
return rowObjectInspector;
} else {
return null;