[SERVER-76412] Separate variable binding and error checking from parsing Created: 21/Apr/23  Updated: 30/May/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-76189 telemetry parsing accidentally ignore... Closed
is related to SERVER-76220 Handle expression context issues in a... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

This came up during SERVER-76189. We have some cases where we don't actually need to do full variable resolution. But sadly the code was intertwined with parsing, so instead we needed to adapt the calling code to be sure to thread in all the outer context variables from the command's 'let' parameter. 

We thought about doing this during SERVER-76189, but the code fallout would be large. I took a look, and there are many expression parsers that accept a `VariablesParseState` and use that or pass it to sub-parsers. It wouldn't be crazy, but there would be a lot of code churn and the alternative approach ended up being pretty clean, so we punted.


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