ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1026
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There's an unhandled type case when preserveNullAndEmptyArrays: true.

      For the following pipeline:

      {$lookup: {
          from: "coll_b",
          as: "docs",
          pipeline: [{$set: {b_ssn: 42}}]
      }},
      {$unwind: {path: "$docs", preserveNullAndEmptyArrays: true}}
      

      We report the type of docs.b_ssn as any, which allows arrays.

      But we report the path docs.b_ssn as non-array.

      The reason is we bail on preserveNullAndEmptyArrays.

      The correct type of docs.b_ssn should be missing|number here, which does not permit arrays, but accounts for the potentially missing path.

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

              Created:
              Updated:
              Resolved: