@Override
      public List<Void> run(List<Long> input) throws Exception {
        String idLists = MetaStoreDirectSql.getIdListForIn(input);
        String queryText = "select \"SD_ID\", \"CD_ID\", \"SERDE_ID\" from \"SDS\" " +
            "where \"SD_ID\" in (" + idLists + ")";
        try (QueryWrapper query = new QueryWrapper(pm.newQuery("javax.jdo.query.SQL", queryText))) {
          List<Object[]> sqlResult = executeWithArray(query.getInnerQuery(), null, queryText);
          for (Object[] row : sqlResult) {
            Long sdId = extractSqlLong(row[0]);
            Long cdId = extractSqlLong(row[1]);
            Long serdeId = extractSqlLong(row[2]);
            sdIdToCdId.put(sdId, cdId);
            sdIdToSerdeId.put(sdId, serdeId);
            cdIds.add(cdId);
          }
        }
        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