private List<Long> getStringListId(List<Long> sdIds) throws MetaException {
    return Batchable.runBatched(maxBatchSize, sdIds, new Batchable<Long, Long>() {
      @Override
      public List<Long> run(List<Long> input) throws Exception {
        List<Long> result = new ArrayList<>();
        String idLists = MetaStoreDirectSql.getIdListForIn(input);
        String queryFromSkewedValues = "select \"STRING_LIST_ID_EID\" " +
            "from \"SKEWED_VALUES\" where \"SD_ID_OID\" in (" + idLists + ")";
        try (QueryWrapper query =
                 new QueryWrapper(pm.newQuery("javax.jdo.query.SQL", queryFromSkewedValues))) {
          List<Long> sqlResult = executeWithArray(query.getInnerQuery(), null, queryFromSkewedValues);
          result.addAll(sqlResult);
        }
        String queryFromValueLoc = "select \"STRING_LIST_ID_KID\" " +
            "from \"SKEWED_COL_VALUE_LOC_MAP\" where \"SD_ID\" in (" + idLists + ")";
        try (QueryWrapper query =
                 new QueryWrapper(pm.newQuery("javax.jdo.query.SQL", queryFromValueLoc))) {
          List<Long> sqlResult = executeWithArray(query.getInnerQuery(), null, queryFromValueLoc);
          result.addAll(sqlResult);
        }
        return result;
      }
    });
  }
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