Validate subplanning works with multiplanning distinct scans

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Fully Compatible
    • QO 2025-01-20, QO 2025-02-03
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When we have a rooted $or query which triggers subplanning, we need to make sure results are correct. The case for distinct() should be fine; however, the aggregation() command path could be incorrect if we apply a non-distinct scan to one of the $or branches, but still rewrite the query to a $groupByDistinct

      We should make sure we avoid $groupByDistinct in any case where one branch uses an index scan, & add subplanning cases for both.

              Assignee:
              Daniel Segel
              Reporter:
              Alya Berciu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: