[SERVER-76827] [CQF] Plan extractor passes wrong projections to EvaluationNode child Created: 04/May/23  Updated: 29/Oct/23  Resolved: 04/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: David Percy Assignee: David Percy
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QO 2023-05-15
Participants:
Linked BF Score: 142

 Description   

When we extract an EvaluationNode from the memo, we pass the 'required' projections unchanged to extract the child. This seems wrong because the EvaluationNode itself produces a binding, so we shouldn't be asking the child to also produce that binding.

It should be more similar to how we handle GroupByNode, where we modify the required projections before passing it to the child node.

I believe this is what's causing recursive_ix_nav.js to fail with a tassert (undefined variable) during lowering.



 Comments   
Comment by Githook User [ 04/May/23 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-76827 [CQF] Handle EvaluationProjection projection in plan extractor

Don't require the child of an EvaluationNode to produce the projection
that the Evaluation binds: this can fail during SBENodeLowering.

Also, use a cost hint to make recursive_ix_nav.js choose the expected
plan: equality prefixes for 'a' and 'c'; residual predicate on 'e'; no
fetch.
Branch: master
https://github.com/mongodb/mongo/commit/b6b365ca5d8da099558eed947188c97085db4db5

Generated at Thu Feb 08 06:33:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.