Convert all $group to distinct scan rewrites to rule-based rewrites

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

      This logic exists slightly outside the normal optimization path for aggregations, but would be easier to reason about if it lived as a set of rules in the rule-based-rewrite engine (would also make the supported document source patterns more explicit/ easier to extend in future).

      Relevant as this came up in SERVER-37715, which extends these rewrites, and proposes additional new ones in TODOs.

            Assignee:
            Unassigned
            Reporter:
            Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: