Passing empty array to $in should result in an error

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.0.5
    • Component/s: Querying
    • None
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Is there a valid case for passing an empty array to the $in query parameter?

      This query runs, but, of course, returns no results:

      db.enron.find({_id : {$in : []}},{_id:1})
      

      Although syntactically valid it doesn't appear to be semantically valid.

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Beau Rothrock
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: