-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
ALL
-
QE 2026-05-25
-
None
-
None
-
None
-
None
-
None
-
None
-
None
A hashed-index equality lookup misses cross-numeric-type matches for half-integer values with an odd integer part (e.g. 1.5, 3.5, -1.5) when the same logical value is stored as both double and Decimal128. A collection scan/btree index scan returns both documents, but a hashed-index scan returns only one.
Repro:
const coll = db.hashed_index_cross_numeric_type_bug; coll.drop(); assert.commandWorked(coll.insertMany([ {_id: 1, a: 1.5}, {_id: 2, a: NumberDecimal("1.5")} ])); assert.commandWorked(coll.createIndex({a: "hashed"})); // COLLSCAN: returns [1, 2] coll.find({a: 1.5}, {_id: 1}).hint({$natural: 1}).toArray(); // Hashed index: returns [1] only coll.find({a: 1.5}, {_id: 1}).hint({a: "hashed"}).toArray();
- is related to
-
SERVER-84794 $geoWithin queries have missing results when location field has extra sub-fields
-
- Closed
-
-
SERVER-12869 Index null values and missing values differently
-
- Backlog
-
-
SERVER-116179 Return error signatures for known 2dsphere index issues in validation response
-
- Closed
-