-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor - P4
-
Affects Version/s: 4.2.0
-
Component/s: Aggregation Framework
-
Fully Compatible
-
Query 2020-02-24
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
The only callers of `MongoProcessCommon::_convertToFieldPaths` are two implementations of `MongoProcessInterface::ensureFieldsUniqueOrResolveDocumentKey`. That function takes as input a vector and quite usefully converts the vector to a set for the return value. But there is only one caller of `ensureFieldsUniqueOrResolveDocumentKey`, so we can move the responsibility of converting a set to the caller to simplify the duties of this method. Essentially, instead of using a protected helper function to share the functionality between the two implementations, move the shared implementation to before the call site. It's not a big deal but would make the interface to this method a little simpler: You give me an optional set of fields and I give you a non-optional set of fields.