public PartitionsStatsResult get_partitions_statistics_req(PartitionsStatsRequest request)
throws MetaException, NoSuchObjectException, TException {
String dbName = request.getDbName(), tblName = request.getTblName();
startFunction("get_partitions_statistics_req: db=" + dbName + " table=" + tblName);
PartitionsStatsResult result = null;
try {
List<ColumnStatistics> stats = getMS().getPartitionColumnStatistics(
dbName, tblName, request.getPartNames(), request.getColNames());
Map<String, List<ColumnStatisticsObj>> map =
new HashMap<String, List<ColumnStatisticsObj>>();
for (ColumnStatistics stat : stats) {
map.put(stat.getStatsDesc().getPartName(), stat.getStatsObj());
}
result = new PartitionsStatsResult(map);
} finally {
endFunction("get_partitions_statistics_req: ", result == null, null, tblName);
}
return result;
}