Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-23628

boundsMatch() in query_planner_test_lib.cpp should verify that the field names of the object match the index key pattern

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • 3.3.5
    • None
    • Querying
    • None
    • Fully Compatible
    • Query 13 (04/22/16)

    Description

      There are a couple query planning test cases that specify the correct index bounds but specify field names that don't match the index key pattern. We should amend these test cases and update the QueryPlannerTest fixture to verify that the entire object structure of the IndexBounds matches the query solution specified.

      TEST_F(QueryPlannerTest, CanCompoundBoundsWhenSharedPrefixIsMultikeyButHasElemMatch) {
          ...
          assertSolutionExists(
              "{fetch: {node: {ixscan: {pattern: {'a.b': 1, 'a.c': 1}, "
              "bounds: {a: [[2, 2, true, true]], b: [[3, 3, true, true]]}}}}}");
      }
      

      TEST_F(QueryPlannerTest, OrQueryCanBeIndexedWhenBothBranchesHaveIndexWithMatchingCollation) {
          ...
          assertSolutionExists(
              "{or: {nodes: ["
              "{fetch: {node: {ixscan: {pattern: {a: 1}, bounds: {a: [['oof','oof',true,true]]}}}}},"
              "{fetch: {node: {ixscan: {pattern: {b: 1}, bounds: {a: [['rab','rab',true,true]]}}}}}]}}");
      }
      

      Attachments

        Activity

          People

            max.hirschhorn@mongodb.com Max Hirschhorn
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: