[SBE] When "notablescan" is enabled, $lookup that uses a collscan on the inner side should fail

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.foo.drop()
      > db.foo2.drop()
      > db.foo.createIndex({a:1})
      > db.foo.insert({a:1})
      > db.foo2.insert({b:1})
      > db.adminCommand({setParameter: 1, notablescan: 1})
      
      // In SBE, the following succeeds (uses a hash join)
      > db.foo.aggregate([{$match: {a: 1}}, {$lookup: {from: "foo2", as: "res", localField: "a", foreignField: "b"}}]) 
      
      // In classic, it fails
      > db.adminCommand({setParameter: 1, internalQueryFrameworkControl: 'forceClassicEngine'})
      > db.foo.aggregate([{$match: {a: 1}}, {$lookup: {from: "foo2", as: "res", localField: "a", foreignField: "b"}}])
      
      "Executor error during aggregate command on namespace: test.foo :: caused by :: No indexed plans available, and running with 'notablescan' 2",

            Assignee:
            James Harrison
            Reporter:
            Hana Pearlman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: