[CQF] Empty query hint in aggregation should not fail optimization

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • QO 2023-11-27, QO 2023-12-11
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The following query fails when it shouldn't (we should be able to handle an empty hint). Removing the hint field makes the command work as expected, and the command works in classic.

       

      > db.adminCommand({setParameter: 1, internalQueryFrameworkControl: "forceBonsai"})
      { "was" : "trySbeEngine", "ok" : 1 }
      > db.runCommand({aggregate: "test", pipeline: [{$match: {a: {$lt: 5}}}, {$project: {'a': 1}}], hint: {}, explain: true})
      {
       "ok" : 0,
       "errmsg" : "Optimization failed either without tryBonsai set, or without a hint.",
       "code" : 7319401,
       "codeName" : "Location7319401"
      }
      

      Looks like we need to add a check somewhere to handle this empty hint case.

       

            Assignee:
            Hana Pearlman
            Reporter:
            Militsa Sotirova
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: