InputInfo inputInfo = new InputInfo(tableSchema, columnIds);
if (table.getPartitionKeysSize() == 0) {
// table without partitions
inputInfo.addPartition(new InputPartition(table));
} else {
// table with partitions, find matches to user filter.
List<Partition> partitions = null;
try {
partitions = client.get_partitions_by_filter(dbName, tableName,
inputDesc.getPartitionFilter(), (short) -1);
} catch (NoSuchObjectException e) {
throw new TException(e.getMessage());
} catch (MetaException e) {
throw new TException(e);
}
for (Partition partition : partitions) {
inputInfo.addPartition(new InputPartition(table, partition));
}
}
InputConf inputConf = new InputConf(conf, profileId);
inputConf.writeNumSplitsToConf(inputDesc.getNumSplits());