}
private FetchWork convertToWork() throws HiveException {
inputs.clear();
if (table != null) {
inputs.add(new ReadEntity(table));
String path = table.getPath().toString();
FetchWork work = new FetchWork(path, Utilities.getTableDesc(table));
PlanUtils.configureInputJobPropertiesForStorageHandler(work.getTblDesc());
work.setSplitSample(splitSample);
return work;
}
List<String> listP = new ArrayList<String>();
List<PartitionDesc> partP = new ArrayList<PartitionDesc>();
for (Partition partition : partsList.getNotDeniedPartns()) {
inputs.add(new ReadEntity(partition));
listP.add(partition.getPartitionPath().toString());
partP.add(Utilities.getPartitionDesc(partition));
}
TableDesc table = Utilities.getTableDesc(partsList.getSourceTable());
FetchWork work = new FetchWork(listP, partP, table);