-
Type: Question
-
Resolution: Fixed
-
Priority: Major - P3
-
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.
- depends on
-
SERVER-50766 [SBE] Identify cases where it's safe to use LeafArrayTraversalMode::kArrayElementsOnly
- Closed