@Override
    public List<String> listPartitionNames(String dbName, String tblName, TableVersionRange version) {
        IcebergCatalogType nativeType = icebergCatalog.getIcebergCatalogType();

        if (nativeType != HIVE_CATALOG && nativeType != REST_CATALOG && nativeType != GLUE_CATALOG) {
            throw new StarRocksConnectorException(
                    "Do not support get partitions from catalog type: " + nativeType);
        }

        long snapshotId = version.end().isPresent() ? version.end().get() : -1;
        return icebergCatalog.listPartitionNames(dbName, tblName, snapshotId, jobPlanningExecutor);
    }
@Test
    public void testListPartitionNames() {
        mockedNativeTableB.newAppend().appendFile(FILE_B_1).appendFile(FILE_B_2).appendFile(FILE_B_3).commit();
        new MockUp<IcebergHiveCatalog>() {
            @Mock
            org.apache.iceberg.Table getTable(String dbName, String tableName) throws StarRocksConnectorException {
                return mockedNativeTableB;
            }
        };
        IcebergHiveCatalog icebergHiveCatalog = new IcebergHiveCatalog(CATALOG_NAME, new Configuration(), DEFAULT_CONFIG);
        CachingIcebergCatalog cachingIcebergCatalog = new CachingIcebergCatalog(CATALOG_NAME, icebergHiveCatalog,
                DEFAULT_CATALOG_PROPERTIES, Executors.newSingleThreadExecutor());
        IcebergMetadata metadata = new IcebergMetadata(CATALOG_NAME, HDFS_ENVIRONMENT, cachingIcebergCatalog,
                Executors.newSingleThreadExecutor(), Executors.newSingleThreadExecutor(), null);
        TableVersionRange version = TableVersionRange.withEnd(Optional.of(
                mockedNativeTableB.currentSnapshot().snapshotId()));
        List<String> partitionNames = metadata.listPartitionNames("db", "table", version);
        Assert.assertEquals(2, partitionNames.size());
        Assert.assertTrue(partitionNames.contains("k2=2"));
        Assert.assertTrue(partitionNames.contains("k2=3"));
    }