Introduce MongoExtensionAggregationStageParseNode to the extensions API

XMLWordPrintableJSON

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

      In order for Desugar stages to be able to participate in query shape generation with the pre-desugaring query shape, we need to provide a new abstraction from which to generate the shape (i.e serialize) before we explicitly desugar. 

       

      Introduce MongoExtensionAggregationStageParseNode to the public API. The vtable it should support is specified in the table below. Note, do not implement get_query_shape. This will be implemented in a different project. 

       

      MongoExtensionAggregationStageParseNode vtable      
      Function Name Return Type Parameters Description
      destroy
      •  
      •  
      Destroys object and frees related resources.
             
      get_query_shape
      • MongoExtensionStatus*
      • MongoExtensionByteBuf** (output)
      • Ownership of the buffer is transferred to the Host.
      • On success:   Populates the MongoExtensionByteBuf pointer  with the stage’s query shape.
      expand  MongoExtensionStatus* 
      • MongoExtensionByteBuf** expandedPipelineBSON)
       

       

      As part of this ticket, implement an SDK adapter, a Host adapter and provide unit tests.

      This ticket will not include adding parsing logic to generate the ParseNode - that work will be deferred to SERVER-109777 instead.

      Please note, https://github.com/mongodb/mongo/commit/8ea157369540ecf2af757fe31a2194d74851fa13 already introduced expand() to the extensions API, under the static descriptor. As part of this ticket, migrate the functionality from the static descriptor to the ParseNode vtable, and update all existing tests.

       

       

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

              Created:
              Updated:
              Resolved: