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

Verify and fix documentToBsonWithPaths() issues

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution
    • Fully Compatible
    • QE 2022-12-26, QE 2023-01-09, QE 2023-07-10, QE 2023-07-24, QE 2023-08-07, QE 2023-08-21, QE 2023-09-04, QE 2023-09-18, QE 2023-10-02, QE 2023-10-16, QE 2023-10-30, QE 2023-11-13, QE 2023-11-27, QE 2023-12-11

      documentToBsonWithPaths() might not be working correctly. It is supposed to return only the parts of a document, but apparently returns more than requested (complete first-level fields), fearing the path semantics for arrays.

      For instance, having document x = {a: {b: 13, c: 14}} and calling documentToBsonWithPaths(x, "a.b") on x would return {a: {b: 13, c: 14}}.

        1. BM-balanced-tree.png
          89 kB
          Victor Ghita
        2. BM-line-tree.png
          56 kB
          Victor Ghita
        3. diff.patch
          28 kB
          Victor Ghita

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: