-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 1.22.1, 1.23.0
-
Component/s: Aggregation pipeline
-
None
-
Not Needed
Problem Description
A valid aggregation pipeline generates the error $eq cannot be top-level" when an attempt is made to export to java
Steps to Reproduce
The following test pipeline demonstrates the problem:[{$addFields: {
"elemZero":
,
"elemOne":
}}, {$group: {
_id: null,
"MICancellation": {
$push: {
$cond: {
if: {
$and: [{
"$eq": [
, "unspecified"]
},
{
"$eq": [
, "date"]
}
]
},
then: "$_id",
else: null
}
}
}
}}]
Expected Results
Java code generated
Actual Results
Error message $eq cannot be top-level" is generated.
Additional Notes
Reported by Customer Freddie Mac
- duplicates
-
COMPASS-4475 Aggregation tool generating Java code that causes runtime errors
- Closed