[SERVER-51470] [SBE] Decide if we should rewrite generatePathTraversal() to only call “makePredicate” callback once Created: 09/Oct/20  Updated: 29/Oct/23  Resolved: 31/Mar/21

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Question Priority: Major - P3
Reporter: Drew Paroski Assignee: Nikita Lapkov (Inactive)
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-50766 [SBE] Identify cases where it's safe ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-03-08, Query Execution 2021-03-22, Query Execution 2021-04-05
Participants:

 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.



 Comments   
Comment by Nikita Lapkov (Inactive) [ 31/Mar/21 ]

I am not sure why the commit hook did not work, but here is the commit: https://github.com/mongodb/mongo/commit/49381f5929198b1eff59bf46c9a5c5eca8ab2fb4 . Closing this ticket.

Generated at Thu Feb 08 05:25:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.