private <T> List<Long> filterIdsByNonNullValue(List<Long> ids, Map<Long, T> map) {
    return ids.stream().filter(id -> map.get(id) != null).collect(Collectors.toList());
  }
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