Implement DocumentSourceExtensionExpandable

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

      As outlined in the technical design, we will need to introduce an explicit desugaring step that will be called from the aggregation execution path immediately after query stats registration.

      This requires that we implement specializations of DocumentSourceExtension, which each have distinct behaviour during expansion As part of this ticket, implement DocumentSourceExtensionExpandable with an expand function. This function should call expand on the parse node and loop through the output following this logic:

      if AstNode:
          create a DocumentSourceExtensionOptimizable, passing through the AstNode and adding the output to the result list
      else if ParseNode:
          if the parse node is a host parse node, createFromBson and add to the result list
          otherwise create another DocumentSourceExtensionExpandable from the ParseNode and add its expand() to the end of the list (recursive expansion)

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

              Created:
              Updated: