@Override
    public void abortSink(String dbName, String tableName, List<TSinkCommitInfo> commitInfos) {
        if (commitInfos == null || commitInfos.isEmpty()) {
            return;
        }
        boolean hasHiveSinkInfo = commitInfos.stream().anyMatch(TSinkCommitInfo::isSetHive_file_info);
        if (!hasHiveSinkInfo) {
            return;
        }

        for (TSinkCommitInfo sinkCommitInfo : commitInfos) {
            if (sinkCommitInfo.isSetHive_file_info()) {
                THiveFileInfo hiveFileInfo = sinkCommitInfo.getHive_file_info();
                fileOps.deleteIfExists(new Path(hiveFileInfo.getPartition_path(), hiveFileInfo.getFile_name()), false);
            }
        }
    }
@Test
    public void testAbortSink() {
        TSinkCommitInfo tSinkCommitInfo = new TSinkCommitInfo();
        hiveMetadata.abortSink("hive_db", "hive_table", Lists.newArrayList());
        hiveMetadata.abortSink("hive_db", "hive_table", Lists.newArrayList(tSinkCommitInfo));

        THiveFileInfo fileInfo = new THiveFileInfo();
        fileInfo.setFile_name("myfile.parquet");
        fileInfo.setPartition_path("hdfs://127.0.0.1:10000/tmp/starrocks/queryid/col1=2");
        fileInfo.setRecord_count(10);
        fileInfo.setFile_size_in_bytes(100);
        tSinkCommitInfo.setHive_file_info(fileInfo);
        hiveMetadata.abortSink("hive_db", "hive_table", Lists.newArrayList(tSinkCommitInfo));
    }