-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
Fully Compatible
-
ALL
-
QE 2024-05-27
While testing a isMember call in the profiler, I spotted that SERVER-51537 changed the temp variable for a call to values() from being a reference to being a full type, leading to a deep copy of the hash table:
} else if (arrTag == value::TypeTags::ArraySet) { + // An empty ArraySet may not have a collation, but we don't need one to definitively + // determine that the empty set doesn't contain the value we are checking. auto arrSet = value::getArraySetView(arrVal); - auto& values = arrSet->values(); - - const bool found = values.find({inputTag, inputVal}) != values.end(); - - return {false, value::TypeTags::Boolean, value::bitcastFrom<bool>(found)}; + if (arrSet->size() == 0) { + return {false, value::TypeTags::Boolean, value::bitcastFrom<bool>(false)}; + } + auto values = arrSet->values();
- is caused by
-
SERVER-51537 Support expression $in in SBE
- Closed