-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.0.16, 7.0.12, 8.0.0-rc13
-
Component/s: None
-
Query Execution
-
Fully Compatible
-
ALL
-
v8.0, v7.0, v6.0
-
-
QE 2024-07-22, QE 2024-08-05
-
200
Hash value for ArraySet is order-dependent: https://github.com/mongodb/mongo/blob/ad8894ae07b93c175e90f992e517160f286c328c/src/mongo/db/exec/sbe/values/value.cpp#L460
So we can have equal sets with different hash values. This basically breaks hash sets and hash maps if ArraySet is used as a key.
It actually can cause queries to produce wrong results if $group uses ArraySet as _id.