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

[SBE] Incorrect results for covered queries using dotted fields

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Fully Compatible
    • ALL
    • Query Execution 2021-02-22, Query Execution 2021-03-08

      Currently in SBE, given an index {{

      {a: 1, b.c:1, b.d: 1}

      }}, a key like {{

      {"": "foo", "": "bar", "": "baz"}

      }} will get inflated to {{

      {a: "foo", "b.c": "bar", "b.d": "baz"}

      }} instead of {a: "foo", b: {c: "bar", d: "baz"}}.

       

      The result of this is that covered queries with projections on dotted fields return incorrect results. Here is the relevant code.

      Either we should fix the rehydration logic, or, build plans that do not require rehydration of the key (instead of getField("a"), we can simply use the slot that the 'a' component is in).

            Assignee:
            ian.boros@mongodb.com Ian Boros
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: