[SERVER-15482] $size with non-whole-number parameter shouldn't require full scan Created: 01/Oct/14 Updated: 22/Feb/16 Resolved: 04/Feb/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 3.3.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Minor Change |
| Sprint: | Query 10 (02/22/16) |
| Participants: |
| Description |
|
Consider:
If "n" is 1.5 or -2, no documents can match. Yet explain() shows a full scan. The query should be short-circuited and return no documents immediately. |
| Comments |
| Comment by Tess Avitabile (Inactive) [ 04/Feb/16 ] |
|
The $size operator now errors on negative inputs, non-integral double inputs, and inputs that cannot be expressed as a 32-bit integer. Previously negative inputs and non-integral double inputs would simply return no results, and longs would be truncated to integers. |
| Comment by Githook User [ 04/Feb/16 ] |
|
Author: {u'username': u'tessavitabile', u'name': u'Tess Avitabile', u'email': u'tess.avitabile@mongodb.com'}Message: |