diff options
Diffstat (limited to 'src/mongo/db/query/index_bounds_builder_eq_null_test.cpp')
| -rw-r--r-- | src/mongo/db/query/index_bounds_builder_eq_null_test.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/db/query/index_bounds_builder_eq_null_test.cpp b/src/mongo/db/query/index_bounds_builder_eq_null_test.cpp index 31e17b6e2c8..af4cdf91303 100644 --- a/src/mongo/db/query/index_bounds_builder_eq_null_test.cpp +++ b/src/mongo/db/query/index_bounds_builder_eq_null_test.cpp @@ -48,7 +48,7 @@ void assertBoundsRepresentEqualsNull(const OrderedIntervalList& oil) { oil.intervals[1].compare(Interval(fromjson("{'': null, '': null}"), true, true))); } -TEST_F(IndexBoundsBuilderTest, TranslateExprEqualToNullIsExactMaybeCovered) { +TEST_F(IndexBoundsBuilderTest, TranslateExprEqualToNullIsInexactFetch) { BSONObj keyPattern = BSON("a" << 1); BSONElement elt = keyPattern.firstElement(); auto testIndex = buildSimpleIndexEntry(keyPattern); @@ -65,11 +65,11 @@ TEST_F(IndexBoundsBuilderTest, TranslateExprEqualToNullIsExactMaybeCovered) { oil.intervals[0].compare(Interval(fromjson("{'': undefined, '': undefined}"), true, true))); ASSERT_EQUALS(Interval::INTERVAL_EQUALS, oil.intervals[1].compare(Interval(fromjson("{'': null, '': null}"), true, true))); - ASSERT_EQUALS(tightness, IndexBoundsBuilder::EXACT_MAYBE_COVERED); + ASSERT_EQUALS(tightness, IndexBoundsBuilder::INEXACT_FETCH); assertIET(inputParamIdMap, ietBuilder, elt, testIndex, oil); } -TEST_F(IndexBoundsBuilderTest, TranslateEqualsToNullShouldBuildExactMaybeCoveredBounds) { +TEST_F(IndexBoundsBuilderTest, TranslateEqualsToNullShouldBuildInexactBounds) { BSONObj indexPattern = BSON("a" << 1); auto testIndex = buildSimpleIndexEntry(indexPattern); @@ -83,12 +83,12 @@ TEST_F(IndexBoundsBuilderTest, TranslateEqualsToNullShouldBuildExactMaybeCovered expr.get(), indexPattern.firstElement(), testIndex, &oil, &tightness, &ietBuilder); ASSERT_EQUALS(oil.name, "a"); - ASSERT_EQUALS(tightness, IndexBoundsBuilder::EXACT_MAYBE_COVERED); + ASSERT_EQUALS(tightness, IndexBoundsBuilder::INEXACT_FETCH); assertBoundsRepresentEqualsNull(oil); assertIET(inputParamIdMap, ietBuilder, indexPattern.firstElement(), testIndex, oil); } -TEST_F(IndexBoundsBuilderTest, TranslateDottedEqualsToNullShouldBuildExactMaybeCoveredBounds) { +TEST_F(IndexBoundsBuilderTest, TranslateDottedEqualsToNullShouldBuildInexactBounds) { BSONObj indexPattern = BSON("a.b" << 1); auto testIndex = buildSimpleIndexEntry(indexPattern); @@ -102,9 +102,7 @@ TEST_F(IndexBoundsBuilderTest, TranslateDottedEqualsToNullShouldBuildExactMaybeC expr.get(), indexPattern.firstElement(), testIndex, &oil, &tightness, &ietBuilder); ASSERT_EQUALS(oil.name, "a.b"); - // Depending on the query projection, this will either be converted to EXACT or to INEXACT_FETCH - // before we build an IXSCAN plan. - ASSERT_EQUALS(tightness, IndexBoundsBuilder::EXACT_MAYBE_COVERED); + ASSERT_EQUALS(tightness, IndexBoundsBuilder::INEXACT_FETCH); assertBoundsRepresentEqualsNull(oil); assertIET(inputParamIdMap, ietBuilder, indexPattern.firstElement(), testIndex, oil); } |
