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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Trivial - P5
    • 3.3.5
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • Query 13 (04/22/16)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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]]}}}}}]}}");
      }
      

              Assignee:
              Max Hirschhorn
              Reporter:
              Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: