@Override
public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws TException {
String catName = request.isSetCatName() ? request.getCatName().toLowerCase() :
getDefaultCatalog(conf);
String dbName = request.getDbName().toLowerCase();
String tblName = request.getTblName().toLowerCase();
startFunction("get_table_statistics_req", ": table=" +
TableName.getQualified(catName, dbName, tblName));
TableStatsResult result = null;
List<String> lowerCaseColNames = new ArrayList<>(request.getColNames().size());
for (String colName : request.getColNames()) {
lowerCaseColNames.add(colName.toLowerCase());
}
try {
ColumnStatistics cs = getMS().getTableColumnStatistics(
catName, dbName, tblName, lowerCaseColNames,
request.getValidWriteIdList());
result = new TableStatsResult((cs == null || cs.getStatsObj() == null
|| (cs.isSetIsStatsCompliant() && !cs.isIsStatsCompliant()))
? Lists.newArrayList() : cs.getStatsObj());
} finally {
endFunction("get_table_statistics_req", result == null, null, tblName);
}
return result;
}