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

Remove need for computing optimizer::VariableEnviroment

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-03-18
    • 35

      The manipulation of the ABT expressions reuses a few classes from the Bonsai project that, in order to do constant folding and expression lowering, create a VariableEnvironment structure that holds the mapping between variable names and bound expression. This class can be pretty slow in case of complex trees, and in the past invoking it twice rather than once was a significant regression in benchmarks involving fast queries. Following the refactoring in SERVER-84558, the optimize() and the extractExpr() methods each create a private copy of the VariableEnvironemnt, and every time a rewrite modifies the tree, such class must be refreshed.
      It turns out that a couple of these rewrite operation could avoid using this class, so we should try to remove the need to compute it

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: