MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName());
boolean foundCol = false;
if (mTable == null) {
throw new
NoSuchObjectException("Table " + tableName +
" for which stats gathering is requested doesn't exist.");
}
MStorageDescriptor mSDS = mTable.getSd();
List<MFieldSchema> colList = mSDS.getCD().getCols();
for(MFieldSchema mCol:colList) {
if (mCol.getName().equals(mStatsObj.getColName().trim())) {
foundCol = true;
break;
}
}
if (!foundCol) {
throw new
NoSuchObjectException("Column " + colName +
" for which stats gathering is requested doesn't exist.");
}
MTableColumnStatistics oldStatsObj = getMTableColumnStatistics(dbName, tableName, colName);