Infinity/-Infinity cannot be used as value of expression in operation/exp editor

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Minor - P4
    • None
    • Affects Version/s: 1.17.0
    • Component/s: Compass
    • None
    • Environment:
      mac os/Mojave 10.14.5
    • None
    • None

      Go to editor, for example within Aggregations tab to create new aggregation pipeline.

      Add any valid expression that accepts numeric values as value for expression (some code removed for brevity):

       

       

      // code placeholder
      /**
       * specifications - The fields to
       *   include or exclude.
       */
      {
        _id: 0,
        max_height: {
          $reduce: {
            input: "validfield",
            initialValue: -Infinity,
            in: "validfield
          }
        }
      }
      

      The Compass editor does not allow to use Infinity/-Infinity as valid expression value and outputs:

       

       

      Expected "[" or AggregationStage but "{" found.
      

      The sample code is used on Chapter 3 of MongoDB University aggregation framework course

       

            Assignee:
            Unassigned
            Reporter:
            Piotr Blazejewicz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: