From 1101287cc7789e9b8b52ba370cee55678aa6c58d Mon Sep 17 00:00:00 2001 From: Anton Guryanov Date: Thu, 14 Jul 2016 16:20:20 +0300 Subject: SERVER-19507 allow DISTINCT_SCAN over trailing field of an index Closes #1101 Signed-off-by: David Storch --- jstests/core/explain_distinct.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'jstests/core/explain_distinct.js') diff --git a/jstests/core/explain_distinct.js b/jstests/core/explain_distinct.js index 57e5f55e065..f2908caa5e7 100644 --- a/jstests/core/explain_distinct.js +++ b/jstests/core/explain_distinct.js @@ -80,7 +80,8 @@ assert.eq([1], coll.distinct('b', {a: 1})); var explain = runDistinctExplain(coll, 'b', {a: 1}); assert.commandWorked(explain); - assert.eq(10, explain.executionStats.nReturned); - assert(planHasStage(explain.queryPlanner.winningPlan, "FETCH")); - assert(isIxscan(explain.queryPlanner.winningPlan)); + assert.eq(1, explain.executionStats.nReturned); + assert(!planHasStage(explain.queryPlanner.winningPlan, "FETCH")); + assert(planHasStage(explain.queryPlanner.winningPlan, "PROJECTION")); + assert(planHasStage(explain.queryPlanner.winningPlan, "DISTINCT_SCAN")); })(); -- cgit v1.2.1