$match is incorrectly swapped before rename of dotted path

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • v9.0
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      PathArrayness is used to make an assumption that pushing down $match before dotted path renames is safe as long as there are no arrays involved.

      However, with dotted path renames, all ancestors of the full path are created as empty objects. This means that pushing the $match below the rename can be incorrect if it’s possible for it to match one of those ancestors. The incorrect optimization will cause docs to be missed that would be captured if no pushdown occurred.

            Assignee:
            Natalie Hill
            Reporter:
            Natalie Hill
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: