[SERVER-8052] json parser should support all types including $minKey/maxKey Created: 31/Dec/12  Updated: 08/Jan/24  Resolved: 12/Apr/18

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 2.3.2
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Benjamin Caimano (Inactive)
Resolution: Done Votes: 0
Labels: extended, json, parsing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File test-min-max.sh    
Issue Links:
Related
related to SERVER-8060 MinKey/MaxKey print incorrect V8 Closed
Participants:

 Description   

Currently the parser doesn't support $minKey/$maxKey.

Looks like we are also missing: Code and Code w/Scope

See jsobj.cpp for the export format.



 Comments   
Comment by Benjamin Caimano (Inactive) [ 20/Mar/18 ]

Looks like it's fine to me, I've attached a test script that performs to expectations. What do you think, mira.carey@mongodb.com?

Comment by Benjamin Caimano (Inactive) [ 20/Mar/18 ]

bencaimano@Bens-MacBook-Pro:/Users/bencaimano/tests/SERVER-5677 [0]$ ./test-min-max.sh
MongoDB shell version: 3.2.19
connecting to: test
switched to db SERVER-8052
false
{
	"acknowledged" : true,
	"insertedIds" : [
		{ "$maxKey" : 1 },
		0,
		Infinity,
		{ "$minKey" : 1 },
		-Infinity
	]
}
{ "_id" : { "$minKey" : 1 } }
{ "_id" : -Infinity }
{ "_id" : 0 }
{ "_id" : Infinity }
{ "_id" : { "$maxKey" : 1 } }
bye
2018-03-20T13:54:01.945-0400	connected to: localhost
2018-03-20T13:54:01.946-0400	exported 5 records
{"_id":{"$maxKey":1}}
{"_id":0.0}
{"_id":+Infinity}
{"_id":{"$minKey":1}}
{"_id":-Infinity}
2018-03-20T13:54:02.007-0400	connected to: localhost
2018-03-20T13:54:02.008-0400	dropping: SERVER-8052.idKeys
2018-03-20T13:54:02.037-0400	imported 5 documents
MongoDB shell version: 3.2.19
connecting to: test
switched to db SERVER-8052
{ "_id" : { "$minKey" : 1 } }
{ "_id" : -Infinity }
{ "_id" : 0 }
{ "_id" : Infinity }
{ "_id" : { "$maxKey" : 1 } }
bye

Comment by Gregory McKeon (Inactive) [ 08/Sep/17 ]

mira.carey@mongodb.com this isn't true anymore, right? Can this be closed fixed?

Generated at Thu Feb 08 03:16:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.