<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 22:37:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[COMPASS-4681] Compass 1.25.0 Java Export To Language with $lookup with sub-pipeline fails when using &quot;Use Builders&quot;</title>
                <link>https://jira.mongodb.org/browse/COMPASS-4681</link>
                <project id="13182" key="COMPASS">Compass </project>
                    <description>&lt;h3&gt;&lt;a name=&quot;ProblemDescription&quot;&gt;&lt;/a&gt;Problem Description&lt;/h3&gt;

&lt;p&gt;Consulting 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 &quot;Unrecognized option for $lookup: let&quot; instead of generating Java code when the &quot;Use Builders&quot; option is selected. The export to language feature will generate code (albeit rather verbose code) if the &quot;Use Builders&quot; option is not selected.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;StepstoReproduce&quot;&gt;&lt;/a&gt;Steps to Reproduce&lt;/h3&gt;

&lt;p&gt;1. Create a single stage aggregation pipeline with a $lookup stage and&lt;br/&gt;
 pass in the following settings to the aggregation pipeline builder&lt;br/&gt;
 for the $lookup stage:&lt;/p&gt;

&lt;p&gt;{{{}}&lt;br/&gt;
&lt;tt&gt;&#160; from: &apos;tree&apos;,&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;&#160; let: { parent_id : &quot;$parent&quot; }, &#160; pipeline : [ {&lt;/tt&gt;&lt;br/&gt;
{{&#160; &#160; $match: { $expr: &lt;/p&gt;
{ $in: [ &quot;$$parent_id&quot;, &quot;$ancestors&quot; ] }
&lt;p&gt; } } ], }}&lt;br/&gt;
&lt;tt&gt;&#160; as: &apos;referenced_in&apos;&lt;/tt&gt;&lt;br/&gt;
&lt;tt&gt;}&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;2. Select Export Pipeline Code to Language&lt;/p&gt;

&lt;p&gt;3. In the Export Pipeline To Language dialog, select &quot;Java&quot; as the&lt;br/&gt;
 language and ensure that the &quot;Use Builders&quot; option is selected.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ExpectedResults&quot;&gt;&lt;/a&gt;Expected Results&lt;/h3&gt;

&lt;p&gt;After following the three steps above, the client expected Compass to generate Java code using the &quot;uncorrelated subquery&quot; syntax as described in our driver documentation &lt;a href=&quot;https://mongodb.github.io/mongo-java-driver/3.7/builders/aggregation/#lookup&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;ActualResults&quot;&gt;&lt;/a&gt;Actual Results&lt;/h3&gt;

&lt;p&gt;Client received an error message &quot;Unrecognized option to $lookup: let&quot; instead. I was am able to reproduce this with Compass 1.25 (Compass 1.26 has the &quot;Use Builders&quot; option disabled as Maurizio Casimirri told me on Slack) - please see attached screen shot.&lt;/p&gt;
&lt;h3&gt;&lt;a name=&quot;AdditionalNotes&quot;&gt;&lt;/a&gt;Additional Notes&lt;/h3&gt;</description>
                <environment>Reproduced both on Windows and MacOS</environment>
        <key id="1643391">COMPASS-4681</key>
            <summary>Compass 1.25.0 Java Export To Language with $lookup with sub-pipeline fails when using &quot;Use Builders&quot;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="13201">Fixed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="timo.geusch@mongodb.com">Timo Geusch</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Mar 2021 16:36:56 +0000</created>
                <updated>Sun, 29 Oct 2023 02:39:57 +0000</updated>
                            <resolved>Wed, 10 Mar 2021 10:10:06 +0000</resolved>
                                    <version>1.25.0</version>
                                    <fixVersion>No version</fixVersion>
                                    <component>Export to Language</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="3656351" author="massimiliano.marcon" created="Wed, 10 Mar 2021 10:10:06 +0000"  >&lt;p&gt;Thank you &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=timo.geusch&quot; class=&quot;user-hover&quot; rel=&quot;timo.geusch&quot;&gt;timo.geusch&lt;/a&gt; for the detailed report. This seems to be the same as &lt;a href=&quot;https://jira.mongodb.org/browse/COMPASS-4111&quot; title=&quot;Export $lookup aggregate to java fails&quot; class=&quot;issue-link&quot; data-issue-key=&quot;COMPASS-4111&quot;&gt;COMPASS-4111&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="1113198">COMPASS-4111</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="1645295">COMPASS-4695</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="303779" name="Screen Shot 2021-03-04 at 3.58.52 PM.png" size="65432" author="timo.geusch@mongodb.com" created="Mon, 8 Mar 2021 16:36:34 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 10 Mar 2021 10:10:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 48 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10257" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Documentation Changes</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="11861"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 48 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>massimiliano.marcon@mongodb.com</customfieldvalue>
            <customfieldvalue>timo.geusch@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyyj67:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hyitbj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hyy5fb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>