|
Author:
{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}
Message: SERVER-16632 Encode TypeBits along with KeyStrings in WT indexes
This allows covered queries to recover the original data, without collapsing
cases that compare equally (such as 1 and 1.0, or 0.0 and -0.0). However, no
attempt is made to preserve specific versions of NaN, they all become
quiet_NaN().
This resolves this issue discussed in SERVER-16762.
Branch: master
https://github.com/mongodb/mongo/commit/a9cacdf8762ed197b1de1fd5d4ff2b47692e5a92
|
|
I can also reproduce this with a normal covered query.
With mmapv1, type information is preserved:
>>> coll = MongoClient()['test']['foo']
|
>>> coll.drop()
|
>>> coll.insert({'a':1})
|
ObjectId('54ad7c2cd0deab4ccc775c73')
|
>>> list(coll.find({'a':1},{'a':1,'_id':0}))
|
[{u'a': 1}]
|
>>> coll.ensure_index('a')
|
u'a_1'
|
>>> list(coll.find({'a':1},{'a':1,'_id':0}))
|
[{u'a': 1}] # EXPECTED.
|
With WiredTiger, type information is lost:
>>> coll = MongoClient()['test']['foo']
|
>>> coll.drop()
|
>>> coll.insert({'a':1})
|
ObjectId('54ad7c4fd0deab4ccc775c74')
|
>>> list(coll.find({'a':1},{'a':1,'_id':0}))
|
[{u'a': 1}]
|
>>> coll.ensure_index('a')
|
u'a_1'
|
>>> list(coll.find({'a':1},{'a':1,'_id':0}))
|
[{u'a': 1.0}] # NOT EXPECTED.
|
cc redbeard0531 dan@10gen.com david.storch
|