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

Use CanonicalDistinct.sortRequirement instead of flipDistinctScanDirection

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

      The distinct scan $group optimization currently uses flipDistinctScanDirection to implement correct semantics for $last and $bottom. Since SERVER-92456 adds a sortRequirement field to CanonicalDistinct, we should just flip the sortRequirement when needed and use it consistently everywhere in the planner code.

            Assignee:
            Unassigned Unassigned
            Reporter:
            henri.nikku@mongodb.com Henri Nikku
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: