Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-62111

Inconsistent results between SBE and Classical engines for queries with $dateAdd on invalid inputs

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL
    • Hide

      collection: {_id:0}

      query:
      find(
      {},
      {x: {$dateAdd: {startDate: "$date",unit: "second",amount: {$indexOfCP: ["foo", "$str", 0]},}}}
      )

      Results:
      classic:

      { "_id" : 0, "x" : null }

      sbe: "code" : 5075301, "errmsg" : "Executor error during find command :: caused by :: $indexOfCP substring must resolve to a string"

      Show
      collection: {_id:0} query: find( {}, {x: {$dateAdd: {startDate: "$date",unit: "second",amount: {$indexOfCP: ["foo", "$str", 0] },}}} ) Results: classic: { "_id" : 0, "x" : null } sbe: "code" : 5075301, "errmsg" : "Executor error during find command :: caused by :: $indexOfCP substring must resolve to a string"
    • QE 2021-12-27
    • 141

    Attachments

      Activity

        People

          irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
          irina.yatsenko@mongodb.com Irina Yatsenko (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: