<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:31 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>[GODRIVER-1497] mongo-go-driver aggregate not apply $lookup</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1497</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;mongo-go-driver demo code:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/249107/249107_image-2020-02-26-17-22-34-057.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;response:&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/249109/249109_image-2020-02-26-17-14-37-905.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/249108/249108_image-2020-02-26-17-19-46-519.png&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;problem desc:&lt;/p&gt;

&lt;p&gt;Hi, There are picture about problem&#160; when I use mongo-go-driver aggregate $lookup &#65292;I hope receive your tip soon, Thank you!&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>centos7&#65292;golang1.10/golang1.12</environment>
        <key id="1187106">GODRIVER-1497</key>
            <summary>mongo-go-driver aggregate not apply $lookup</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</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="13203">Gone away</resolution>
                                        <assignee username="divjot.arora@mongodb.com">Divjot Arora</assignee>
                                    <reporter username="dingjiangnx@aliyun.com">Demon Brown</reporter>
                        <labels>
                    </labels>
                <created>Wed, 26 Feb 2020 09:26:27 +0000</created>
                <updated>Fri, 27 Oct 2023 20:01:20 +0000</updated>
                            <resolved>Mon, 30 Mar 2020 20:27:45 +0000</resolved>
                                    <version>1.3.0</version>
                    <version>1.4.0</version>
                                                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2930859" author="divjot.arora" created="Tue, 3 Mar 2020 14:31:30 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=dingjiangnx%40aliyun.com&quot; class=&quot;user-hover&quot; rel=&quot;dingjiangnx@aliyun.com&quot;&gt;dingjiangnx@aliyun.com&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;The stack trace you provided shows a panic inside a &lt;tt&gt;bson.M&lt;/tt&gt; delcaration, which shouldn&apos;t be possible as &lt;tt&gt;bson.M&lt;/tt&gt; is only a type definition for map&lt;span class=&quot;error&quot;&gt;&amp;#91;string&amp;#93;&lt;/span&gt;interface{}. Can you provide the collection names and some sample documents for each collection, as well as code that we can run outside of your existing application? If you have a Github account, the easiest way to provide code is through a Github gist (&lt;a href=&quot;https://gist.github.com/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://gist.github.com/&lt;/a&gt;). If not, you can write it in a standalone &lt;tt&gt;main.go&lt;/tt&gt; file and attach it to your reply.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;&amp;#8211; Divjot&lt;/p&gt;</comment>
                            <comment id="2909775" author="dingjiangnx@aliyun.com" created="Wed, 26 Feb 2020 09:52:00 +0000"  >&lt;p&gt;1. mongo shell command :&lt;/p&gt;

&lt;p&gt;db.tb_isr_records.aggregate(&lt;span class=&quot;error&quot;&gt;&amp;#91;\{$match:{app_id:&amp;quot;1005439786280841&amp;quot;,ir_add_date:&amp;quot;20200115&amp;quot;}},\{$lookup:{from:&amp;quot;tb_isr_visitors&amp;quot;, localField:&amp;quot;fb_uid&amp;quot;, foreignField:&amp;quot;fb_uid&amp;quot;, as: &amp;quot;res&amp;quot;}},\{$unwind:&amp;quot;$res&amp;quot;},\{$match:{app_id:&amp;quot;1005439786280841&amp;quot;,&amp;quot;res.iv_add_date&amp;quot;:&amp;quot;20200114&amp;quot;,ir_add_date:&amp;quot;20200115&amp;quot;}},\{$group:{_id:&amp;quot;$fb_uid&amp;quot;}},\{$group:{_id:0,counts:{$sum:1}}}&amp;#93;&lt;/span&gt;);&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;2. real mongo-go-driver aggregation content about $lookup:&#160;&lt;/p&gt;

&lt;p&gt;whereMap := bson.A{&lt;br/&gt;
 bson.M{&quot;$match&quot;: bson.M{&quot;app_id&quot;: appId, &quot;ir_add_date&quot;: irDate}},&lt;br/&gt;
 bson.M{&quot;$lookup&quot;: bson.M{&quot;from&quot;: &quot;tb_isr_visitors&quot;, &quot;localField&quot;: &quot;fb_uid&quot;, &quot;foreignField&quot;: &quot;fb_uid&quot;, &quot;as&quot;: &quot;res&quot;}},&lt;br/&gt;
 bson.M{&quot;$unwind&quot;: &quot;$res&quot;},&lt;br/&gt;
 bson.M{&quot;$match&quot;: bson.M{&quot;app_id&quot;: appId, &quot;res.iv_add_date&quot;: ivDate, &quot;ir_add_date&quot;: irDate}},&lt;br/&gt;
 bson.M{&quot;$group&quot;: bson.M{&quot;_id&quot;: &quot;$fb_uid&quot;}},&lt;br/&gt;
 bson.M{&quot;$group&quot;: bson.M{&quot;_id&quot;: 0, &quot;counts&quot;: bson.M&lt;/p&gt;
{&quot;$sum&quot;: 1}
&lt;p&gt;}},&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;3. The command is normal , but mongo-go-driver demo is panic&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="249109" name="image-2020-02-26-17-14-37-905.png" size="147419" author="dingjiangnx@aliyun.com" created="Wed, 26 Feb 2020 09:14:42 +0000"/>
                            <attachment id="249108" name="image-2020-02-26-17-19-46-519.png" size="213980" author="dingjiangnx@aliyun.com" created="Wed, 26 Feb 2020 09:19:50 +0000"/>
                            <attachment id="249107" name="image-2020-02-26-17-22-34-057.png" size="182522" author="dingjiangnx@aliyun.com" created="Wed, 26 Feb 2020 09:22:37 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hwiyon:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>