[SERVER-41416] Remove _convertToFieldPaths from MongoProcessCommon Created: 31/May/19 Updated: 29/Oct/23 Resolved: 19/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 4.2.0 |
| Fix Version/s: | 4.3.4 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Anton Korshunov | Assignee: | Ruoxin Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, qexec-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2020-02-24 |
| Participants: |
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 19/Feb/20 ] |
|
Author: {'name': 'Ruoxin Xu', 'email': 'ruoxin.xu@mongodb.com'}Message: |
| Comment by Charlie Swanson [ 31/May/19 ] |
|
anton.korshunov did you mean to put this into needs scheduling, or directly to the backlog? Right now it's unassigned and in this sprint, which is a bit confusing. |