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

Validate subplanning works with multiplanning distinct scans

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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
    • 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@mongodb.com Daniel Segel
            Reporter:
            alya.berciu@mongodb.com Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None