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

Separate variable binding and error checking from parsing

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query Optimization

    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.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: