[SERVER-8196] $type value should be signed extended Created: 16/Jan/13 Updated: 06/Dec/22 Resolved: 11/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | query_triage | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
| Comments |
| Comment by David Storch [ 11/Jun/18 ] | |||||||
|
kay.kim, I've filed DOCS-11791 described the proposed improvements to bsonspec.org. | |||||||
| Comment by David Storch [ 11/Jun/18 ] | |||||||
|
It seems the confusion here is around whether a BSON type byte should be interpreted as a signed or unsigned char. The server's BSON implementation quite clearly treats it as a signed char, and implements the type code for MinKey as -1, not 255. https://docs.mongodb.com/manual/reference/bson-types/ also documents the type code for MinKey as -1. Therefore, I think the server is working as designed. ian.whalen kay.kim, do you know where I can file an improvement request for http://bsonspec.org/spec.html? | |||||||
| Comment by Asya Kamsky [ 07/Jun/18 ] | |||||||
|
http://bsonspec.org/spec.html still says 0xFF is MinKey though our own docs correct state it's -1. 0xff behaves differently now:
| |||||||
| Comment by Scott Hernandez (Inactive) [ 18/Jan/13 ] | |||||||
|
The bson spec uses 0xFF as the type value for MinKey : http://bsonspec.org/#/specification | |||||||
| Comment by Eliot Horowitz (Inactive) [ 18/Jan/13 ] | |||||||
|
Where is this documented it should work? |