jstests/noPassthrough/and_sorted.js
// correctly did or did not use an AND_SORTED for index intersection.
correctly did or did not use an AND_SORTED for index intersection.
correctly did or did not use an AND_SORTED for index intersection .
function assertAndSortedUsed({query, expectedResult, shouldUseAndSorted} = {}) {
        const queryResult = coll.find(query);
        const expl = queryResult.explain();
        assertArrayEq({actual: queryResult.toArray(), expected: expectedResult});
        assert.eq(shouldUseAndSorted,
                  planHasStage(db, getWinningPlan(expl.queryPlanner), "AND_SORTED"));
    }
function assertAndSortedUsed ( { query , expectedResult , shouldUseAndSorted } = { } ) { const queryResult = coll . find ( query ) ; const expl = queryResult . explain ( ) ; assertArrayEq ( { actual : queryResult . toArray ( ) , expected : expectedResult } ) ; assert . eq ( shouldUseAndSorted , planHasStage ( db , getWinningPlan ( expl . queryPlanner ) , "AND_SORTED" ) ) ; }
correctly did or did not use an AND_SORTED for index intersection.
correctly did or did not use an AND_SORTED for index intersection .