private void getStatsTableListResult(
      String queryText, List<org.apache.hadoop.hive.common.TableName> result) throws MetaException {
    LOG.debug("Running {}", queryText);
    try (QueryWrapper query = new QueryWrapper(pm.newQuery("javax.jdo.query.SQL", queryText))) {
      List<Object[]> sqlResult = MetastoreDirectSqlUtils
          .ensureList(executeWithArray(query.getInnerQuery(), STATS_TABLE_TYPES, queryText));
      for (Object[] line : sqlResult) {
        result.add(new org.apache.hadoop.hive.common.TableName(
            MetastoreDirectSqlUtils.extractSqlString(line[2]), MetastoreDirectSqlUtils
            .extractSqlString(line[1]), MetastoreDirectSqlUtils.extractSqlString(line[0])));
      }
    }
  }
Checks if the column descriptors still has references for other SD-s. If not, then removes
them. Should be called with the list short enough to not trip up Oracle/etc.
@param columnDescriptorIdList The column identifiers
@throws MetaException If there is an SQL exception during the execution it converted to
MetaException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java