<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:11:00 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-6195] consider $concat to concatenate strings instead of overloading $add</title>
                <link>https://jira.mongodb.org/browse/SERVER-6195</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;There is a fair amount of implementation overhead for implementing both numeric addition and string concatenation with $add, and there are some related open tickets to fix: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6193&quot; title=&quot;string constants prevent optimization of non string sensitive operators&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6193&quot;&gt;&lt;del&gt;SERVER-6193&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6194&quot; title=&quot;Nested $add operators may be improperly reordered by constant folding implementation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6194&quot;&gt;&lt;del&gt;SERVER-6194&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also I can see how &apos;+&apos; might be considered a convenience in javascript (though personally I would prefer a separate operator like &apos;.&apos;), but I&apos;m not sure if there is a benefit in using the same $-expression to perform both addition and concatenation in the aggregation framework.&lt;/p&gt;

&lt;p&gt;EDIT: $concat currently supports the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;All number types are converted to their string representation&lt;/li&gt;
	&lt;li&gt;dates are converted to ISO-formatted strings&lt;/li&gt;
	&lt;li&gt;code, symbol and string are already string types&lt;/li&gt;
	&lt;li&gt;Null, undefined and missing fields (&quot;nullish values&quot;) are converted to empty string&lt;/li&gt;
	&lt;li&gt;timestamps are converted to ctime format + the increment portion.  e.g., &quot;Wed Jun 30 21:49:08 1993&quot;&lt;/li&gt;
	&lt;li&gt;all other types error out&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="42238">SERVER-6195</key>
            <summary>consider $concat to concatenate strings instead of overloading $add</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="9">Done</resolution>
                                        <assignee username="mathias@mongodb.com">Mathias Stearn</assignee>
                                    <reporter username="aaron">Aaron Staple</reporter>
                        <labels>
                    </labels>
                <created>Sun, 24 Jun 2012 20:06:17 +0000</created>
                <updated>Sat, 26 Aug 2017 13:53:39 +0000</updated>
                            <resolved>Tue, 18 Dec 2012 20:05:32 +0000</resolved>
                                                    <fixVersion>2.3.2</fixVersion>
                                    <component>Aggregation Framework</component>
                                        <votes>11</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="369862" author="dan@10gen.com" created="Fri, 28 Jun 2013 12:28:22 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=marcin.floryan%40comparethemarket.com&quot; class=&quot;user-hover&quot; rel=&quot;marcin.floryan@comparethemarket.com&quot;&gt;marcin.floryan@comparethemarket.com&lt;/a&gt;, $cvoncat only works on strings &amp;#8211; this ticket description is misleading.  See &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-8239&quot; title=&quot;$concat should fail on non-string types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-8239&quot;&gt;&lt;del&gt;SERVER-8239&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="369749" author="marcin.floryan@comparethemarket.com" created="Fri, 28 Jun 2013 07:59:17 +0000"  >&lt;p&gt;Could someone clarify - the description seems to suggest that concat supports multiple data types but it only appears to work for strings at the moment.&lt;/p&gt;</comment>
                            <comment id="220708" author="auto" created="Thu, 20 Dec 2012 21:51:08 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-20T20:46:21Z&apos;, u&apos;email&apos;: u&apos;mathias@10gen.com&apos;, u&apos;name&apos;: u&apos;Mathias Stearn&apos;}
&lt;p&gt;Message: Fix test to not use collection.aggregate since it needs its own error handling&lt;/p&gt;

&lt;p&gt;Follow up to &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6195&quot; title=&quot;consider $concat to concatenate strings instead of overloading $add&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6195&quot;&gt;&lt;del&gt;SERVER-6195&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d978f7f0ea41146dc60a7c0a0e7d1de768a296a7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d978f7f0ea41146dc60a7c0a0e7d1de768a296a7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="218517" author="auto" created="Tue, 18 Dec 2012 18:49:36 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-07-24T21:29:40Z&apos;, u&apos;name&apos;: u&apos;Matt Dannenberg&apos;, u&apos;email&apos;: u&apos;dannenberg.matt@gmail.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6195&quot; title=&quot;consider $concat to concatenate strings instead of overloading $add&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6195&quot;&gt;&lt;del&gt;SERVER-6195&lt;/del&gt;&lt;/a&gt; implement $concat for strings in aggro&lt;/p&gt;

&lt;p&gt;this also eliminates the problems seen in &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6194&quot; title=&quot;Nested $add operators may be improperly reordered by constant folding implementation&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6194&quot;&gt;&lt;del&gt;SERVER-6194&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: modified by Mathias on 2012/12/17 to use new Doc/Val API&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/966fa94895fb5526367327c66f284dabbc566a8e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/966fa94895fb5526367327c66f284dabbc566a8e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="208500" author="pgrinchenko@collective.com" created="Thu, 6 Dec 2012 23:39:45 +0000"  >&lt;p&gt;We really would like to have this feature&lt;/p&gt;</comment>
                            <comment id="148259" author="auto" created="Fri, 27 Jul 2012 19:52:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-07-24T06:59:40-07:00&apos;, u&apos;email&apos;: u&apos;dannenberg.matt@gmail.com&apos;, u&apos;name&apos;: u&apos;Matt Dannenberg&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6570&quot; title=&quot;disallow $add with strings&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6570&quot;&gt;&lt;del&gt;SERVER-6570&lt;/del&gt;&lt;/a&gt; disallow strings in $add in aggro&lt;/p&gt;

&lt;p&gt;also started &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6166&quot; title=&quot;consider expanding to wider data type on math overflow&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6166&quot;&gt;&lt;del&gt;SERVER-6166&lt;/del&gt;&lt;/a&gt; (ints overflowing to long in math) by doing the add portion&lt;br/&gt;
redo testall.js p20 when &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6195&quot; title=&quot;consider $concat to concatenate strings instead of overloading $add&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6195&quot;&gt;&lt;del&gt;SERVER-6195&lt;/del&gt;&lt;/a&gt; is done&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d3b12c40a91d20dc5b86e40402308c7b2320f9a5&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d3b12c40a91d20dc5b86e40402308c7b2320f9a5&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="146417" author="redbeard0531" created="Tue, 24 Jul 2012 02:38:04 +0000"  >&lt;p&gt;moving to 2.2 to keep it on the radar, but it is low priority and likely to be bumped 2.3.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="45178">SERVER-6570</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="42235">SERVER-6194</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="60924">DOCS-949</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="411168">SERVER-30461</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 24 Jul 2012 02:38:04 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        10 years, 33 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-6570'>SERVER-6570</a></s>]]></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_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>asya.kamsky@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            10 years, 33 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aaron</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>dan@mongodb.com</customfieldvalue>
            <customfieldvalue>marcin.floryan@comparethemarket.com</customfieldvalue>
            <customfieldvalue>mathias@mongodb.com</customfieldvalue>
            <customfieldvalue>pgrinchenko@collective.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnyrb:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7808</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10166" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Tests Written</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10154"><![CDATA[Complete]]></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_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|hriwo7:</customfieldvalue>

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