Details
-
Task
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
-
None
-
None
-
Query Optimization
Description
This is specific to Bonsai and not an issue with the classic optimizer. If we query:
t.insert([
|
{_id: 1, a: NumberInt(3)}, |
{_id: 2, a: NumberLong(1)}, |
{_id: 3, a: NumberDecimal("2.0")} |
]);
|
results = t.find({a: {$gt: 0}}).toArray(); |
Then the classic engine results and the expected results are:
expected=[
|
{ "_id" : 1, "a" : NumberInt(3) }, |
{ "_id" : 2, "a" : NumberLong(1) }, |
{ "_id" : 3, "a" : NumberDecimal("2.0") }, |
];
|
But the actual results from Bonsai are:
actual=[
|
{ "_id" : 1, "a" : 3 }, |
{ "_id" : 2, "a" : NumberLong(1) }, |
{ "_id" : 3, "a" : NumberDecimal("2.0") }, |
];
|
This seems to only be an issue with NumberInt, as NumberLong and NumberDecimal are returned correctly.