static Object updateManyPartitionsStats(@NotNull HMSClient client,
                                         @NotNull String dbName,
                                         @NotNull String tableName,
                                         @NotNull List<String> partNames) throws TException {
    List<ColumnStatisticsObj> statsObj = new ArrayList<>();
    ColumnStatisticsData statsData = new ColumnStatisticsData(
        ColumnStatisticsData._Fields.STRING_STATS, new StringColumnStatsData(100, 10.1, 20, 30));
    statsObj.add(new ColumnStatisticsObj("id", "int", statsData));
    ColumnStatisticsDesc partDesc = new ColumnStatisticsDesc(false, dbName, tableName);
    for (String partName : partNames) {
      partDesc.setPartName(partName);
      ColumnStatistics partColStat = new ColumnStatistics(partDesc, statsObj);
      partColStat.setEngine("hive");
      client.updatePartitionColumnStats(partColStat);
    }
    return null;
  }
Add many partitions in one HMS call

@param client      HMS Client
@param dbName      database name
@param tableName   table name
@param arguments   list of partition names
@param npartitions number of partitions to create
@throws TException if fails to create partitions
standalone-metastore/metastore-tools/tools-common/src/main/java/org/apache/hadoop/hive/metastore/tools/Util.java