public void deleteColumnStatsState(long tbl_id) throws MetaException {
    String queryText;
    switch (dbType.dbType) {
      case MYSQL:
        // @formatter:off
        queryText = ""
            + "delete pp from " + PARTITION_PARAMS + " pp, " + PARTITIONS + " p"
            + " where"
            + "   p.\"PART_ID\" = pp.\"PART_ID\" AND"
            + "   p.\"TBL_ID\" = " + tbl_id
            + "  and \"PARAM_KEY\" = '"+StatsSetupConst.COLUMN_STATS_ACCURATE + "'";
        // @formatter:on
        break;
      default:
        // @formatter:off
        queryText = ""
            + "delete from " + PARTITION_PARAMS
            + " where"
            + "   \"PART_ID\" in (select p.\"PART_ID\"  from " + PARTITIONS + " p where"
            + "   p.\"TBL_ID\" =  " + tbl_id + ")"
            + "  and \"PARAM_KEY\" = '"+StatsSetupConst.COLUMN_STATS_ACCURATE + "'";
        // @formatter:on
    }

    try {
      executeNoResult(queryText);
    } catch (SQLException e) {
      throw new MetaException("Error removing column stat states:" + e.getMessage());
    }
  }
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