When saving variables from sub-pipeline, use correct ExpressionContext

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Fix _variables initialization in DocumentSourceLookUp and DocumentSourceUnionWith

      This PR addresses issues with variable initialization in the aggregation pipeline stages:

      1. In `DocumentSourceLookUp`, moves the initialization of `_variables` and `_variablesParseState` after the creation of `_fromExpCtx` to ensure proper context.

      2. In `DocumentSourceUnionWith`:

      • Refactors the `UnionWithSharedState` constructor to encapsulate variable initialization
      • Removes redundant variable initialization parameters from constructor calls which can lead to dangling IdGenerator pointers.

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: