Investigate why null semantics are incorrect for implicit cycle test case

XMLWordPrintableJSON

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

      After SERVER-114582, the random reorderer enumerates the following QSN:

      INDEXED_NESTED_LOOP_JOIN_EMBEDDING [key = key,cor.key.foo $= key]
      leftEmbeddingField: "none"
      rightEmbeddingField: "lf"
        |  |
        |  FETCH [test.null_semantics_md_other]
        |  |
        |  INDEX_PROBE_NODE [test.null_semantics_md_other]
        |  keyPattern: { "key" : 1 }
        |  indexName: "key_1"
        |  isMultiKey: false
        |  isUnique: false
        |  isSparse: false
        |  isPartial: false
        |
        NESTED_LOOP_JOIN_EMBEDDING [key = key.foo]
        leftEmbeddingField: "none"
        rightEmbeddingField: "cor"
        |  |
        |  COLLSCAN [test.null_semantics_md_third]
        |  direction: "forward"
        |
        COLLSCAN [test.null_semantics_md]
        direction: "forward"

      for this query:

      {
                      $lookup: {
                          from: otherColl.getName(),
                          localField: "key",
                          foreignField: "key",
                          as: "lf",
                      },
                  },
                  {$unwind: "$lf"},
                  {
                      $lookup: {
                          from: thirdColl.getName(),
                          let: {f: "$lf.key"},
                          pipeline: [{$match: {$expr: {$eq: ["$$f", "$key.foo"]}}}],
                          as: "cor",
                      },
                  },
                  {$unwind: "$cor"},

      Which results in incorrect results.

            Assignee:
            Alberto Massari
            Reporter:
            Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: