Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-41416

Remove _convertToFieldPaths from MongoProcessCommon

    • 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.

            Assignee:
            ruoxin.xu@mongodb.com Ruoxin Xu
            Reporter:
            anton.korshunov@mongodb.com Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: