@Override
    public ProcResult fetchResult() throws AnalysisException {
        final BaseProcResult result = new BaseProcResult();
        result.setNames(CurrentQueryStatisticsProcDir.TITLE_NAMES.asList());
        List<QueryStatisticsInfo> queryInfos = QueryStatisticsInfo.makeListFromMetricsAndMgrs();
        List<QueryStatisticsInfo> otherQueryInfos = GlobalStateMgr.getCurrentState().getQueryStatisticsInfoFromOtherFEs();

        List<QueryStatisticsInfo> allInfos = Stream.concat(queryInfos.stream(), otherQueryInfos.stream())
                .collect(Collectors.toList());

        List<List<String>> sortedRowData = allInfos
                .stream()
                .map(QueryStatisticsInfo::formatToList)
                .collect(Collectors.toList());

        result.setRows(sortedRowData);
        return result;
    }
@Test
    public void testFetchResult() throws AnalysisException {
        try (MockedStatic<QueryStatisticsInfo> queryStatisticsInfo = mockStatic(QueryStatisticsInfo.class)) {
            queryStatisticsInfo.when(QueryStatisticsInfo::makeListFromMetricsAndMgrs)
                    .thenReturn(LOCAL_TEST_QUERIES);

            new MockUp<NodeMgr>() {
                @Mock
                public List<QueryStatisticsInfo> getQueryStatisticsInfoFromOtherFEs() {
                    return REMOTE_TEST_QUERIES;
                }
            };

            BaseProcResult result = (BaseProcResult) new CurrentGlobalQueryStatisticsProcDir().fetchResult();
            Assert.assertEquals(LOCAL_TEST_QUERIES.size() + REMOTE_TEST_QUERIES.size(),
                    result.getRows().size());

            List<List<String>> expectedQueryStatisticsInfo =
                    Stream.concat(LOCAL_TEST_QUERIES.stream(), REMOTE_TEST_QUERIES.stream())
                            .map(QueryStatisticsInfo::formatToList)
                            .collect(Collectors.toList());

            assertThat(result.getRows()).containsExactlyInAnyOrderElementsOf(expectedQueryStatisticsInfo);
        }
    }