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

CBR asserts when $mod has negative divisor

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2025-02-03

      > db.adminCommand({setParameter:1, planRankerMode: "heuristicCE"})
      > db.c.insert({a: 1})
      > db.c.find({"a":{"$mod":[-1,0]}}).explain() 
      
      MongoServerError: Invalid Selectivity value < minValue: (-1 < 0)
      

      CBR generates a negative selectivity in this case.

            Assignee:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: