[COMPASS-3176] Cannot use "$cond" in aggregate pipeline in an "$expr" Created: 04/Oct/18  Updated: 29/Oct/23  Resolved: 09/Apr/19

Status: Closed
Project: Compass
Component/s: Compass
Affects Version/s: 1.16.0-beta.7, 1.15.4
Fix Version/s: 1.19.0

Type: Bug Priority: Major - P3
Reporter: Nishant Bhardwaj Assignee: Durran Jordan
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-10-04 at 9.01.26 PM.png     PNG File Screen Shot 2018-10-04 at 9.01.38 PM.png    
Sprint: Iteration Antelope, Iteration Bison

 Description   

Tested in compass 1.15.4 and 1.16.0-beta.7, the aggregation pipeline builder gives error:

Field must not begin with '$' or '.', field path was: $cond

However, same query with "$cond" runs fine in mongo shell. Please see the screenshots attached.



 Comments   
Comment by Githook User [ 09/Apr/19 ]

Author:

{'name': 'Durran Jordan', 'username': 'durran', 'email': 'durran@gmail.com'}

Message: COMPASS-3176/3489: Fixing agg pipeline validation:

Fixes $cond and $text validation errors in $match stages.
Branch: master
https://github.com/10gen/compass/commit/6535f4dab5b624d0d582554350daf205e5c32628

Comment by Githook User [ 09/Apr/19 ]

Author:

{'email': 'durran@gmail.com', 'name': 'Durran Jordan', 'username': 'durran'}

Message: COMPASS-3176/3489: Fixing agg pipeline validation:

Fixes $cond and $text validation errors in $match stages.
Branch: COMPASS-3176-3489
https://github.com/10gen/compass/commit/b319c917740aa099a09d652e4f92df1015f6d8d2

Comment by Pierre Bazoge [ 24/Jan/19 ]

Got same issue +1

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