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

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • Querying
    • Fully Compatible
    • Query Execution 2021-03-08, Query Execution 2021-03-22, Query Execution 2021-04-05

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: