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

Old JS engine cannot properly roundtrip NumberLong

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Trivial - P5 Trivial - P5
    • None
    • 5.3.3
    • None
    • Query Execution
    • ALL
    • 6

    Description

      It seems that the old JS engine does not return correct result for the following expression.

      function accumulate(state, input) {
        return input > state ? input : state;
      }
      

      Input params are state = '' (empty string) and input = NumberLong(1). The old engine returns {} and the new engine returns NumberLong(1). If input is 1.0, then both engines return 1.0

      Attachments

        Activity

          People

            backlog-query-execution Backlog - Query Execution
            yoonsoo.kim@mongodb.com Yoon Soo Kim
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated: