Extend sub-pipeline dependency graphs to invoke the PathArrayness API

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When constructing a DependencyGraph for a sub-pipeline (e.g. $lookup, $unionWith), we currently use the default canPathBeArray callback, which always returns true. This means canPathBeArray() queries that recurse into a subpipeline conservatively report that any collection-origin path in the sub-collection could be an array, even when the real PathArrayness API for that collection would say otherwise.

      Without this, array-related optimizations that rely on canPathBeArray() will be overly conservative for paths resolved through subpipelines. This is safe but may miss optimization opportunities.

            Assignee:
            Matt Olma
            Reporter:
            Matt Olma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: