Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-76412

Separate variable binding and error checking from parsing

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization

      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.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: