Use CanonicalDistinct.sortRequirement instead of flipDistinctScanDirection

XMLWordPrintableJSON

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

      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
              Reporter:
              Henri Nikku
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: