Subpiplines in dependency graph do not distinguish result fields

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • Minor Change
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      A $lookup with absorbed $unwind with includeArrayIndex can have multiple output fields.

      [{$lookup: {from: 'coll_b', localField: 'x', foreignField: 'y', as: 'e'}},
       {$unwind: {path: '$e', includeArrayIndex: 'idx'}}]
      

      Here the resulting DocumentSourceLookup post-absorbtion outputs "as" and "idx".

      The graph does not distinguish between these fields and existing APIs like canPathBeArray assume "idx" contains the results from the subpipeline.

      (Thanks to Henri for noticing this!)

            Assignee:
            Vesko Karaganev
            Reporter:
            Vesko Karaganev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: