public void dropExternalAnalyzeStatus(String tableUUID) {
        List<AnalyzeStatus> expireList = analyzeStatusMap.values().stream().
                filter(status -> status instanceof ExternalAnalyzeStatus).
                filter(status -> ((ExternalAnalyzeStatus) status).getTableUUID().equals(tableUUID)).
                collect(Collectors.toList());

        expireList.forEach(status -> analyzeStatusMap.remove(status.getId()));
        for (AnalyzeStatus status : expireList) {
            GlobalStateMgr.getCurrentState().getEditLog().logRemoveAnalyzeStatus(status);
        }
    }
@Test
    public void testDropExternalAnalyzeStatus() {
        Table table = connectContext.getGlobalStateMgr().getMetadataMgr().getTable("hive0", "partitioned_db", "t1");

        AnalyzeMgr analyzeMgr = new AnalyzeMgr();
        AnalyzeStatus analyzeStatus = new ExternalAnalyzeStatus(100,
                "hive0", "partitioned_db", "t1",
                table.getUUID(), ImmutableList.of("c1", "c2"), StatsConstants.AnalyzeType.FULL,
                StatsConstants.ScheduleType.ONCE, Maps.newHashMap(), LocalDateTime.now());
        analyzeMgr.addAnalyzeStatus(analyzeStatus);

        analyzeMgr.dropExternalAnalyzeStatus(table.getUUID());
        Assert.assertEquals(0, analyzeMgr.getAnalyzeStatusMap().size());
    }