[COMPASS-3663] Infinity/-Infinity cannot be used as value of expression in operation/exp editor Created: 22/May/19  Updated: 05/Jun/19  Resolved: 05/Jun/19

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.17.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Piotr Blazejewicz Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mac os/Mojave 10.14.5


Issue Links:
Duplicate
duplicates COMPASS-3584 $bucket Aggregation Stage Fails on In... Closed

 Description   

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

 



 Comments   
Comment by Massimiliano Marcon [ 05/Jun/19 ]

Already tracking this in COMPASS-3584

Generated at Wed Feb 07 22:33:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.