<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 05:12:49 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>[SERVER-46923] $unionWith doesn&apos;t support null pipelines</title>
                <link>https://jira.mongodb.org/browse/SERVER-46923</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Mongoast considers the following syntaxes to be equivalent:&lt;/p&gt;
&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&#160;$unionWith: &quot;foo&quot; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ $unionWith: { coll: &quot;foo&quot; }}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{ $unionWith: { coll: &quot;foo&quot;, pipeline: null } }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;The third case is currently unsupported by the server, though, because null pipelines are not allowed.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1278736">SERVER-46923</key>
            <summary>$unionWith doesn&apos;t support null pipelines</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="backlog-query-optimization">Backlog - Query Optimization</assignee>
                                    <reporter username="varsha.subrahmanyam@mongodb.com">Varsha Subrahmanyam</reporter>
                        <labels>
                            <label>qopt-team</label>
                    </labels>
                <created>Tue, 17 Mar 2020 21:03:25 +0000</created>
                <updated>Tue, 6 Dec 2022 02:32:48 +0000</updated>
                                                                                                <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="3044416" author="james.wahlin@10gen.com" created="Fri, 17 Apr 2020 13:59:06 +0000"  >&lt;p&gt;I spent some time looking at how we handle null arguments in other commands and aggregation stages and found that we do not equate null with missing. Examples of this are:&lt;br/&gt;
1) A &quot;collation: null&quot; argument to the find command results in: &quot;Failed to parse: collation: null. &apos;collation&apos; field must be of BSON type object.&quot;&lt;br/&gt;
2) A &quot;min: null&quot; argument to the find command results in: &quot;Failed to parse: min: null. &apos;min&apos; field must be of BSON type object.&quot;&lt;br/&gt;
3) A &quot;let: null&quot; argument to a $lookup stage results in: &quot;$lookup argument &apos;let: null&apos; must be an object, is type null&quot;&lt;br/&gt;
4) A &quot;output: null&quot; argument to a $bucketAuto stage results in: &quot;The $bucketAuto &apos;output&apos; field must be an object, but found type: null&quot;&lt;/p&gt;

&lt;p&gt;Given that in addition to our current plan to not treat null and missing in the same manner, I am inclined to say we should make no changes at this point in time. Rather than close this ticket however, how about we backlog and make part of PM-1648, &quot;Distinguish Null and Missing in Indexes&quot;? We can give deeper thought to this under that project and would be in a position to make broader changes if we decide this is the right way to go.&lt;/p&gt;</comment>
                            <comment id="3041755" author="david.storch" created="Wed, 15 Apr 2020 23:57:56 +0000"  >&lt;p&gt;I&apos;m unsure whether we want to go down the road of generally equating null and missing when it comes to the grammar of MQL. Generally speaking, an MQL expression like {$operator: {arg1: &amp;lt;value&amp;gt;, arg2: null}} is not currently considered identical in meaning to {$operator: {arg1: &amp;lt;value&amp;gt;}}. And when it comes to cleaning up null/missing semantics, my understanding is that the plan of record is to define that null != missing.&lt;/p&gt;</comment>
                            <comment id="3039392" author="charlie.swanson" created="Tue, 14 Apr 2020 18:45:34 +0000"  >&lt;p&gt;The query team decided that Jacob&apos;s proposal #2 is probably most user-friendly. Let&apos;s do that. Throwing this into a bucket of quick tech debt to hopefully schedule one BF Friday.&lt;/p&gt;</comment>
                            <comment id="3039242" author="jacob.evans" created="Tue, 14 Apr 2020 17:35:40 +0000"  >&lt;p&gt;The IDL treats null as missing, even going as far as to print error messages referring to them as such. Aggregate commands and $lookup stages do not accept null or missing, they accept only arrays, although they can be empty. So null == missing != [ ].&lt;/p&gt;

&lt;p&gt;I propose continuing to equate null and missing. For the commands accepting arrays we should either:&lt;br/&gt;
1) Stay the course and allow only [ ] to mean nothing for pipeline arguments.&lt;br/&gt;
2) Allow pipelines to be optional/nothing in general and allow both null and missing.&lt;br/&gt;
Either approach would be consistent.&lt;/p&gt;</comment>
                            <comment id="3023586" author="charlie.swanson" created="Thu, 2 Apr 2020 17:19:22 +0000"  >&lt;p&gt;Hey &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jacob.evans&quot; class=&quot;user-hover&quot; rel=&quot;jacob.evans&quot;&gt;jacob.evans&lt;/a&gt; can you dig in a little deeper to figure out a summary of how we treat null parameters? I remember some complexity in the mapReduce project where the drivers were sending null if the parameter was unspecified. I also somehow gained a belief that a field marked as &quot;optional&quot; in the IDL will accept null as equivalent to not present. I&apos;m not entirely sure how I came to believe it or whether it&apos;s true...&#160;&lt;/p&gt;

&lt;p&gt;Another relevant question is how we treat the &quot;pipeline&quot; argument to $lookup and to the aggregate command in general. I suspect those will not accept null nor missing/unspecified.&lt;/p&gt;

&lt;p&gt;Can you come up with one or more proposals of how we should proceed with optional parameters when it comes to null?&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25126"><![CDATA[Query Optimization]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 2 Apr 2020 17:19:22 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        3 years, 42 weeks, 5 days 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>PM-873</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>false</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            3 years, 42 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-query-optimization</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>jacob.evans@mongodb.com</customfieldvalue>
            <customfieldvalue>james.wahlin@mongodb.com</customfieldvalue>
            <customfieldvalue>varsha.subrahmanyam@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hx99tb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hr2bvb:</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_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hx8w2n:</customfieldvalue>

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