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

Move exec translation into the various subclasses of wf::Expression

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0 Desired
    • Component/s: None
    • None
    • Query Optimization
    • Query Optimization 2021-05-31

      The current class hierarchy assumes that all window function expressions have a removable and non-removable variety. And the current translation code expects that the variety of executor depends only on the bound type (lower unbounded vs. not and document vs range bounds).  This turns out not to be the case for roughly a third of our expressions, so these classes have the potential at runtime to throw exceptions, since they still have to implement buildAccumulatorOnly and buildRemovable. 

      The proposal is to move the translation logic into the expression classes as Expression::translate, and leave buildAccumulatorOnly and buildRemovable as private methods only where they make sense.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            joel.redman@mongodb.com Joel Redman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: