public void updateTableStatistics(String dbName, String tableName, Function<HivePartitionStats, HivePartitionStats> update) {
        org.apache.hadoop.hive.metastore.api.Table originTable = client.getTable(dbName, tableName);
        if (originTable == null) {
            throw new StarRocksConnectorException("Table '%s.%s' not found", dbName, tableName);
        }

        org.apache.hadoop.hive.metastore.api.Table newTable = originTable.deepCopy();
        HiveCommonStats curCommonStats = toHiveCommonStats(originTable.getParameters());
        HivePartitionStats curPartitionStats = new HivePartitionStats(curCommonStats, new HashMap<>());
        HivePartitionStats updatedStats = update.apply(curPartitionStats);

        HiveCommonStats commonStats = updatedStats.getCommonStats();
        Map<String, String> originParams = newTable.getParameters();
        originParams.put(TRANSIENT_LAST_DDL_TIME, String.valueOf(System.currentTimeMillis() / 1000));
        newTable.setParameters(updateStatisticsParameters(originParams, commonStats));
        client.alterTable(dbName, tableName, newTable);

        //TODO(stephen): update table column statistics
    }
@Test
    public void testUpdateTableStatistics() {
        HiveMetaClient client = new MockedHiveMetaClient();
        HiveMetastore metastore = new HiveMetastore(client, "hive_catalog", MetastoreType.HMS);
        HivePartitionStats partitionStats = HivePartitionStats.empty();
        metastore.updateTableStatistics("db", "table", ignore -> partitionStats);
    }