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

[SBE] Decide if we should rewrite generatePathTraversal() to only call “makePredicate” callback once

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

      While we were implementing SBE support for the $in operator for the find() command, the question arose as to whether we want to rewrite the generatePathTraversal() function (in "src/mongo/db/query/sbe_stage_builder_filter.cpp") so that it only calls the “makePredicate” callback once when mode == kArrayAndItsElements .

      It's unfortunate that generatePathTraversal() calls the “makePredicate” callback twice when mode == kArrayAndItsElements , because if the “makePredicate” callback adds stages to the tree (which we do for InMatchExpressions in some cases) then we end up have two copies of these stages in tree.

            Assignee:
            nikita.lapkov@mongodb.com Nikita Lapkov (Inactive)
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: