@Override
      public List<Void> run(List<String> input) throws Exception {
        String sqlFilter = PARTITIONS + ".\"PART_NAME\" in  (" + makeParams(input.size()) + ")";
        List<Long> partitionIds = getPartitionIdsViaSqlFilter(catName, dbName, tblName, sqlFilter,
            input, Collections.emptyList(), -1);
        if (!partitionIds.isEmpty()) {
          String deleteSql = "delete from " + PART_COL_STATS + " where \"PART_ID\" in ( " + getIdListForIn(partitionIds) + ")";
          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 partition column stats. ", e);
            throw new MetaException("Error removing partition column stats: " + e.getMessage());
          }
        }
        return null;
      }
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