[COMPASS-2874] $replaceRoot stages give an "Expected "[" or AggregationStage but "{" found." even on valid syntax Created: 24/May/18  Updated: 29/Oct/23  Resolved: 28/May/18

Status: Closed
Project: Compass
Component/s: Aggregation pipeline, Compass
Affects Version/s: 1.14.0
Fix Version/s: 1.14.0, 1.15.0

Type: Bug Priority: Major - P3
Reporter: Gaurav Gupta Assignee: Durran Jordan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Error with correct syntax.png     PNG File Works fine with this syntax.png    
Sprint: Sprint Vanilla Ice

 Description   

$replaceRoot Stage throws error event on correct syntax as below

gaurav> db.produce.aggregate( [{$replaceRoot: { newRoot: "$in_stock" }} ] )

But works well with this syntax:

gaurav> db.produce.aggregate( [    {      $replaceRoot: { newRoot: {newRoot:"$in_stock"} }    } ] )

See attachments for details.


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