-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Query Execution
-
None
-
Query Execution
-
Fully Compatible
-
QE 2026-08-31, QE 2026-09-15
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Replace calls to `BSONElement::fieldName()` with calls to `BSONElement::fieldNameStringData()` in cases where the knowing the field name length would be beneficial.
`BSONElement::fieldName()` only returns a const char* pointer, whereas `fieldNameStringData()` returns an std::string_view with an already pre-calculated length.
Stuffing the return value from `BSONElement::fieldName()` into other std::string_views requires recalculating the field name length, which is totally avoidable by using `fieldNameStringData()` instead.