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

Test only for approximate equality in arithmetic_expression_constant_folding.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The test arithmetic_expression_constant_folding.js generates a set of random floating point numbers and multiplies them together using both unoptimized and optimized (constant-folded) versions of the same query. Currently it asserts that the two results must be identical, but due to precision limitations they can differ by an infinitesimal amount, e.g. from pre-computing partial results at constant folding time versus multiplying strictly left-to-right in the unoptimized case.

      Instead this needs to test for approximate equality to avoid false failures.

            Assignee:
            kevin.cherkauer@mongodb.com Kevin Cherkauer
            Reporter:
            kevin.cherkauer@mongodb.com Kevin Cherkauer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None