@Override
    public void addPartitions(String dbName, String tableName, List<HivePartitionWithStats> partitions) {
        List<org.apache.hadoop.hive.metastore.api.Partition> hivePartitions = partitions.stream()
                .map(HiveMetastoreApiConverter::toMetastoreApiPartition)
                .collect(Collectors.toList());
        client.addPartitions(dbName, tableName, hivePartitions);
        // TODO(stephen): add partition column statistics
    }
@Test
    public void testAddPartitions() {
        HiveMetaClient client = new MockedHiveMetaClient();
        HiveMetastore metastore = new HiveMetastore(client, "hive_catalog", MetastoreType.HMS);
        HivePartition hivePartition = HivePartition.builder()
                .setColumns(Lists.newArrayList(new Column("c1", Type.INT)))
                .setStorageFormat(HiveStorageFormat.PARQUET)
                .setDatabaseName("db")
                .setTableName("table")
                .setLocation("location")
                .setValues(Lists.newArrayList("p1=1"))
                .setParameters(new HashMap<>()).build();

        HivePartitionStats hivePartitionStats = HivePartitionStats.empty();
        HivePartitionWithStats hivePartitionWithStats = new HivePartitionWithStats("p1=1", hivePartition, hivePartitionStats);
        metastore.addPartitions("db", "table", Lists.newArrayList(hivePartitionWithStats));
    }