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

[SBE] $in match expression fails to match a document when NaN value types differ

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • None
    • ALL
    • Hide

       

       db.coll.insert({a: {b: NaN}})
       db.coll.aggregate([{$match: {"a.b": {$in: [NumberDecimal("-NaN"), ["deposit", {str: "overriding"}]]}}}])
      

      Expected: to match the document.
      Actual: document does not match.

      Show
         db.coll.insert({a: {b: NaN}})  db.coll.aggregate([{$match: { "a.b" : {$in: [NumberDecimal( "-NaN" ), [ "deposit" , {str: "overriding" }]]}}}]) Expected : to match the document. Actual : document does not match.
    • Query Execution 2021-07-12, Query Execution 2021-07-26
    • 33

    Description

      $in match expression fails to match a document when NaN value types differ, that is when one type is double and another Decimal128.

       

       

      Attachments

        Issue Links

          Activity

            People

              mindaugas.malinauskas@mongodb.com Mindaugas Malinauskas (Inactive)
              mindaugas.malinauskas@mongodb.com Mindaugas Malinauskas (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: