[SERVER-19972] Passing empty array to $in should result in an error Created: 14/Aug/15 Updated: 06/Dec/22 Resolved: 15/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 3.0.5 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Beau Rothrock | Assignee: | Backlog - Query Optimization |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
Is there a valid case for passing an empty array to the $in query parameter? This query runs, but, of course, returns no results:
Although syntactically valid it doesn't appear to be semantically valid. |
| Comments |
| Comment by Asya Kamsky [ 15/Mar/22 ] |
|
Semantically this is valid since the list for $in may be generated programatically. In addition this would be backwards breaking for all existing applications.
|