public boolean deleteTableColumnStatistics(long tableId, List<String> colNames, String engine) {
    String deleteSql = "delete from " + TAB_COL_STATS + " where \"TBL_ID\" = " + tableId;
    if (colNames != null && !colNames.isEmpty()) {
      deleteSql += " and \"COLUMN_NAME\" in (" + colNames.stream().map(col -> "'" + col + "'").collect(Collectors.joining(",")) + ")";
    }
    if (engine != null) {
      deleteSql += " and \"ENGINE\" = '" + engine + "'";
    }
    try {
      executeNoResult(deleteSql);
    } catch (SQLException e) {
      LOG.warn("Error removing table column stats. ", e);
      return false;
    }
    return true;
  }
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