Audit and remove all callers of ExpressionContext::getNeedsMerge()

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ExpressionContext::getNeedsMerge() is currently overloaded to mean $group accumulators need to output partial results and that $sortKey should be populated. SERVER-103724 replaced the needsMerge bit on the ExpressionContext with an enum that allows us to differentiate these cases (the wire protocol still uses booleans).

      This ticket represents the work to audit all callers of getNeedsMerge() and replace them with a check for sorted/unsorted merge. Then we can remove the getNeedsMerge() function entirely.

            Assignee:
            Unassigned
            Reporter:
            Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: