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

Passing empty array to $in should result in an error

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

      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:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            rothrock Beau Rothrock
            Votes:
            0 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved: