HistogramCE fails when path contains empty array

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • ALL
    • None
    • 3
    • 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
              Reporter:
              Ben Shteinfeld
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: