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

HistogramCE fails when path contains empty array

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

      db.c.drop()
      db.c.insert({a: []})
      db.c.createIndex({a: 1})
      db.runCommand({analyze: 'c', key: 'a'})
      db.adminCommand({setParameter: 1, planRankerMode: "histogramCE"})
      db.c.find({a: {$gt: 1}}).toArray()
      
      Error: error: {
           "ok" : 0,
           "errmsg" : "Array histograms should contain at least one array",
           "code" : 9160701,
           "codeName" : "Location9160701"
      }

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

              Created:
              Updated: