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

[CQF] Comparison between doubles and NumberDecimals returns incorrect results

    XMLWordPrintable

Details

    • Task
    • Status: Open
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Comes from this CQF pass through test.
      Querying for a number less than decimal 0.3 should return the double 0.3, because a double 0.3 is actually 0.2999999999999999888. So,

      t.insert({y: 0.3})t.find({y: {$lt: NumberDecimal('0.3')}})
      

      Should return

      {y: 0.3}
      

      This is not a type bracketing issue.

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            emily.wang@mongodb.com Emily Wang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: