Modify create_document_results_and_metadata() host service to accept DPL callback

XMLWordPrintableJSON

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

      The M1 version of create_document_results_and_metadata() intentionally deferred DPL callback support to M2. For sharded execution, the design calls for the host service to accept a callback that can return:

      • the document-results merge sort pattern
      • the metadata merge pipeline
      • callback-owned state and cleanup hooks

      The API shape for M2 should look like:

      typedef MongoExtensionStatus* (*MongoExtensionDocResultsDPLCallback)(
          void* userData,
          MongoExtensionByteBuf** docSortPatternOut,
          MongoExtensionByteBuf** metadataMergePipelineOut);
      
      MongoExtensionStatus* (*create_document_results_and_metadata)(
          MongoExtensionByteView bsonSpec,
          MongoExtensionByteView metadataVarName,
          MongoExtensionDocResultsDPLCallback dplCallback,
          void* dplCallbackUserData,
          void (*dplCallbackDestroy)(void*),
          MongoExtensionAggStageAstNode** node);

            Assignee:
            Josh Siegel
            Reporter:
            Josh Siegel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: