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

Create a dynamic DocumentSource to agg::Stage mapping function

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2025-04-28, QE 2025-05-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Add and unit-test a dynamic stage mapping method with provisionary signature

      namespace mongo::exec::agg {
        intrusive_ptr<Stage> buildStage(const intrusive_ptr<DocumentSource>&);
      }
      

      The method should use a global map (e.g., attached to the service context) containing dynamically-added mapping functions for each document source type ID. Initially, this map should be populated with dummy/epsilon mapping functions simply casting intrusive_ptr<DocmentSource> to intrusive_ptr<agg::Stage> and returning a copy of the ref-counted pointer.

      Since we already have document_source_visitor_registry.h which already 'hangs' on the service context as a decorator, we should evaluate if we can re-use it for this purpose.

            Assignee:
            serhii.lysenko@mongodb.com Serhii Lysenko
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: