public synchronized void refreshPartition(List<HivePartitionName> partitionNames) {
        if (metastore instanceof CachingHiveMetastore) {
            metastore.refreshPartition(partitionNames);
        } else {
            Map<HivePartitionName, Partition> updatedPartitions = loadPartitionsByNames(partitionNames);
            partitionCache.putAll(updatedPartitions);

            Map<HivePartitionName, HivePartitionStats> updatePartitionStats = loadPartitionsStatistics(partitionNames);
            partitionStatsCache.putAll(updatePartitionStats);

            if (enableListNameCache && !partitionNames.isEmpty()) {
                HivePartitionName firstName = partitionNames.get(0);
                DatabaseTableName databaseTableName = DatabaseTableName.of(firstName.getDatabaseName(), firstName.getTableName());
                // refresh partitionKeysCache with all partition values
                HivePartitionValue hivePartitionValue = HivePartitionValue.of(
                        databaseTableName, HivePartitionValue.ALL_PARTITION_VALUES);
                partitionKeysCache.put(hivePartitionValue, loadPartitionKeys(hivePartitionValue));
            }
        }
    }
@Test
    public void testRefreshPartition() {
        CachingHiveMetastore cachingHiveMetastore = new CachingHiveMetastore(
                metastore, executor, expireAfterWriteSec, refreshAfterWriteSec, 1000, true);

        List<HivePartitionName> partitionNames = Lists.newArrayList(
                HivePartitionName.of("db1", "table1", "col1=1"),
                HivePartitionName.of("db1", "table1", "col1=2"));
        cachingHiveMetastore.refreshPartition(partitionNames);
    }