public void updateTableStatistics(String dbName, String tableName, Function<HivePartitionStats, HivePartitionStats> update) {
        try {
            metastore.updateTableStatistics(dbName, tableName, update);
        } finally {
            if (!(metastore instanceof CachingHiveMetastore)) {
                refreshTable(dbName, tableName, true);
            }
        }
    }
@Test
    public void testUpdateTableStats() {
        CachingHiveMetastore cachingHiveMetastore = new CachingHiveMetastore(
                metastore, executor, expireAfterWriteSec, refreshAfterWriteSec, 1000, false);
        HivePartitionStats partitionStats = HivePartitionStats.empty();
        cachingHiveMetastore.updateTableStatistics("db", "table", ignore -> partitionStats);
    }