Implement create_host_stage_parse_node in the Extensions API

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When an extension Desugar stage expands into a stage that is not implemented by the extension, the extension must be able to provide a node in the ExpansionArray which the Host can later parse into the actual runtime implementation, either a LiteParsedDocumentSource, or a DocumentSource depending on where expansion is taking place. 

      For this purpose, the Extensions API will provide a function (create_host_stage_parse_node) which will permit extensions to create a ParseNode representing an extension stage which the extension cannot implement (i.e $match). 

       

      // Addition to MongoExtensionHostPortal
      typedef struct MongoExtensionHostPortalVTable {
      /**
       * create_host_stage_parse_node: Creates a Host implemented ParseNode for a stage which 
       * the extension does not implement. 
       **/
      MongoExtensionStatus* (*create_host_stage_parse_node)(MongoExtensionByteView bsonSpec,
                                                MongoExtensionAggregationStageParseNode** node);
      } MongoExtensionHostPortalVTable;
      

       

      Add this function to the public API, and add unit tests for it. 

            Assignee:
            Cedric Sirianni
            Reporter:
            Santiago Roche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: