@Override
      public List<Void> run(List<Long> input) throws Exception {
        String idLists = MetaStoreDirectSql.getIdListForIn(input);
        // First remove any constraints that may be associated with these CDs
        String deleteConstraintsByCd = "delete from \"KEY_CONSTRAINTS\" where \"CHILD_CD_ID\" in ("
            + idLists + ") or \"PARENT_CD_ID\" in (" + idLists + ")";
        updateWithStatement(PreparedStatement::executeUpdate, deleteConstraintsByCd);

        // Then delete COLUMNS_V2 before CDS for foreign constraints.
        String deleteColumns = "delete from \"COLUMNS_V2\" where \"CD_ID\" in (" + idLists + ")";
        updateWithStatement(PreparedStatement::executeUpdate, deleteColumns);

        // Finally delete CDS
        String deleteCDs = "delete from \"CDS\" where \"CD_ID\" in (" + idLists + ")";
        updateWithStatement(PreparedStatement::executeUpdate, deleteCDs);
        return null;
      }
Gets the next CS id from sequence MPartitionColumnStatistics and increment the CS id by numStats.
@return The CD id before update.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdatePart.java