public void updatePartitionStatistics(String dbName, String tableName, String partitionName,
                                          Function<HivePartitionStats, HivePartitionStats> update) {
        try {
            metastore.updatePartitionStatistics(dbName, tableName, partitionName, update);
        } finally {
            if (!(metastore instanceof CachingHiveMetastore)) {
                refreshPartition(Lists.newArrayList(HivePartitionName.of(dbName, tableName, partitionName)));
            }
        }
    }
@Test
    public void testUpdatePartitionStats() {
        CachingHiveMetastore cachingHiveMetastore = new CachingHiveMetastore(
                metastore, executor, expireAfterWriteSec, refreshAfterWriteSec, 1000, false);
        HivePartitionStats partitionStats = HivePartitionStats.empty();
        cachingHiveMetastore.updatePartitionStatistics("db", "table", "p1=1", ignore -> partitionStats);
    }