[COMPASS-4681] Compass 1.25.0 Java Export To Language with $lookup with sub-pipeline fails when using "Use Builders" Created: 08/Mar/21 Updated: 29/Oct/23 Resolved: 10/Mar/21 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Export to Language |
| Affects Version/s: | 1.25.0 |
| Fix Version/s: | No version |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Timo Geusch | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Reproduced both on Windows and MacOS |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Documentation Changes: | Not Needed | ||||||||||||||||
| Description |
Problem DescriptionConsulting client of mine ran into this - when building an aggregation pipeline that uses the uncorrelated sub-pipeline form of the $lookup stage rather than the form that uses to and from fields, the export to language function for Java fails with the error "Unrecognized option for $lookup: let" instead of generating Java code when the "Use Builders" option is selected. The export to language feature will generate code (albeit rather verbose code) if the "Use Builders" option is not selected. Steps to Reproduce1. Create a single stage aggregation pipeline with a $lookup stage and {{{}} } } ], }} 2. Select Export Pipeline Code to Language 3. In the Export Pipeline To Language dialog, select "Java" as the Expected ResultsAfter following the three steps above, the client expected Compass to generate Java code using the "uncorrelated subquery" syntax as described in our driver documentation here. Actual ResultsClient received an error message "Unrecognized option to $lookup: let" instead. I was am able to reproduce this with Compass 1.25 (Compass 1.26 has the "Use Builders" option disabled as Maurizio Casimirri told me on Slack) - please see attached screen shot. Additional Notes |
| Comments |
| Comment by Massimiliano Marcon [ 10/Mar/21 ] |
|
Thank you timo.geusch for the detailed report. This seems to be the same as COMPASS-4111. Worth pointing out that in Compass 1.26, we temporarily disabled the use of builders as the syntax we generate is incompatible with the most recent stable version of the Java driver. We are planning to enable them again once the new version of the Java driver is out. |