public void addPartitions(String dbName, String tableName, List<HivePartitionWithStats> partitions) {
        try {
            metastore.addPartitions(dbName, tableName, partitions);
        } catch (Exception e) {
            LOG.warn("Failed to execute metastore.addPartitions", e);
            throw e;
        } finally {
            if (!(metastore instanceof CachingHiveMetastore)) {
                List<HivePartitionName> partitionNames = partitions.stream()
                        .map(name -> HivePartitionName.of(dbName, tableName, name.getPartitionName()))
                        .collect(Collectors.toList());
                refreshPartition(partitionNames);
            }
        }
    }
@Test
    public void testAddPartitionFailed() {
        CachingHiveMetastore cachingHiveMetastore = new CachingHiveMetastore(
                metastore, executor, expireAfterWriteSec, refreshAfterWriteSec, 1000, false);
        HivePartition hivePartition = HivePartition.builder()
                // Unsupported type
                .setColumns(Lists.newArrayList(new Column("c1", Type.BITMAP)))
                .setStorageFormat(HiveStorageFormat.PARQUET)
                .setDatabaseName("db")
                .setTableName("table")
                .setLocation("location")
                .setValues(Lists.newArrayList("p1=1"))
                .setParameters(new HashMap<>()).build();

        HivePartitionStats hivePartitionStats = HivePartitionStats.empty();
        HivePartitionWithStats hivePartitionWithStats = new HivePartitionWithStats("p1=1", hivePartition, hivePartitionStats);
        Assert.assertThrows(StarRocksConnectorException.class, () -> {
            cachingHiveMetastore.addPartitions("db", "table", Lists.newArrayList(hivePartitionWithStats));
        });
    }