diff options
author | David Storch <david.storch@10gen.com> | 2017-02-22 17:52:55 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2017-02-24 09:59:48 -0500 |
commit | 73d37b8fc33a3c429dfd21ad305b2c355c2a9828 (patch) | |
tree | d9b7f34b12154468a1ae105d58cb1dba8d3f93e6 /src/mongo/db/query/query_planner_array_test.cpp | |
parent | 9c9bbf3318113cfdd4d9b72f493b6ebd23f1837e (diff) | |
download | mongo-73d37b8fc33a3c429dfd21ad305b2c355c2a9828.tar.gz |
SERVER-2104 add support for covered projections with dotted field paths
For example, suppose you have index {"a.b": 1}. The
projection {_id: 0, "a.b": 1} will now result in a covered
plan when this index is used.
Diffstat (limited to 'src/mongo/db/query/query_planner_array_test.cpp')
-rw-r--r-- | src/mongo/db/query/query_planner_array_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/query/query_planner_array_test.cpp b/src/mongo/db/query/query_planner_array_test.cpp index a4e4c38998a..0595e2f5ac7 100644 --- a/src/mongo/db/query/query_planner_array_test.cpp +++ b/src/mongo/db/query/query_planner_array_test.cpp @@ -1439,7 +1439,7 @@ TEST_F(QueryPlannerTest, CanMakeCoveredPlanForNonArrayTrailingFieldWithPathLevel "bounds: {'a.z':[[1,1,true,true]],b:[[3,3,true,true]],'c.z':[[2,2,true,true]]}}}}}"); } -TEST_F(QueryPlannerTest, CannotCoverNonMultikeyDottedField) { +TEST_F(QueryPlannerTest, CanCoverNonMultikeyDottedField) { MultikeyPaths multikeyPaths{{}, {0U}}; addIndex(BSON("a.y" << 1 << "b.z" << 1), multikeyPaths); runQueryAsCommand( @@ -1448,9 +1448,9 @@ TEST_F(QueryPlannerTest, CannotCoverNonMultikeyDottedField) { assertNumSolutions(2U); assertSolutionExists("{proj: {spec: {_id:0,'a.y':1}, node: {cscan: {dir: 1}}}}"); assertSolutionExists( - "{proj: {spec: {_id:0,'a.y':1}, node: {fetch: {filter: null, node: {ixscan:" + "{proj: {spec: {_id:0,'a.y':1}, node: {ixscan:" "{pattern: {'a.y':1,'b.z':1}, filter: null," - "bounds: {'a.y':[[1,1,true,true]],'b.z':[[2,2,true,true]]}}}}}}}"); + "bounds: {'a.y':[[1,1,true,true]],'b.z':[[2,2,true,true]]}}}}}"); } TEST_F(QueryPlannerTest, ContainedOrElemMatchValue) { |