Override DocumentSourceExtensionOptimizable::getDependencies() to report metadata

XMLWordPrintableJSON

    • Query Integration
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Once the appropriate changes have been made to the API and handle, DocumentSourceExtensionOptimizable should override getDependencies(). 

      The pseudocode for DocumentSourceExtensionOptimizable::getDependencies() is as follows:

      1. Call logicalStageHandle->getProperties()
      2. Parse out requiredMetadataFields, providedMetadataFields, and preservesUpstreamMetadata
      3. For each field in requiredMetadataFields:
        1. Check if the metadata field is known to the server
          1. If so, call deps->setNeedsMetadata(), adding the field
          2. If not, uassert
      4. If preservesUpstreamMetadata is false, clear metadataAvailable.
      5. For each field in providedMetadataFields:
        1. Check if the metadata field is known to the server
          1. If so, call deps->setMetadataAvailable(), adding the field
          2. If not, uassert

      This ticket should implement this logic in `DocumentSourceExtensionOptimizable` and update the corresponding unit test. This ticket should not create a full e2e test for an extension.

            Assignee:
            Aditya Deshpande
            Reporter:
            Josh Siegel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: