public static List<QueryDetail> getQueryDetailsAfterTime(long eventTime) {
        List<QueryDetail> results = Lists.newArrayList();
        for (QueryDetail queryDetail : TOTAL_QUERIES) {
            if (queryDetail.getEventTime() > eventTime) {
                results.add(queryDetail);
            }
        }
        return results;
    }
@Test
    public void testExecutor() throws Exception {
        boolean old = Config.enable_collect_query_detail_info;
        Config.enable_collect_query_detail_info = true;
        starRocksAssert.withDatabase("db1")
                .useDatabase("db1")
                .withTable("create table test_running_detail (c1 int, c2 int) " +
                        "properties('replication_num'='1') ");

        String sql = "select * from test_running_detail";
        QueryStatement parsedStmt = (QueryStatement) UtFrameUtils.parseStmtWithNewParser(sql, connectContext);
        StmtExecutor executor = new StmtExecutor(connectContext, parsedStmt);
        long startTime = System.currentTimeMillis();
        executor.addRunningQueryDetail(parsedStmt);
        executor.execute();
        executor.addFinishedQueryDetail();

        List<QueryDetail> queryDetails = QueryDetailQueue.getQueryDetailsAfterTime(startTime);

        QueryDetail runningDetail = queryDetails.get(0);
        Assert.assertEquals(QueryDetail.QueryMemState.RUNNING, runningDetail.getState());
        Assert.assertEquals(sql, runningDetail.getSql());

        QueryDetail finishedDetail = queryDetails.get(1);
        Assert.assertEquals(QueryDetail.QueryMemState.FINISHED, finishedDetail.getState());
        Assert.assertEquals(sql, finishedDetail.getSql());

        Config.enable_collect_query_detail_info = old;
    }