<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:34:12 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-14217] Support NumberLong arithmetic in mongo shell and server JS</title>
                <link>https://jira.mongodb.org/browse/SERVER-14217</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Currently, NumberLongs are automatically cast to numbers when arithmetic is performed on them (courtesy of .toNumber()).  This means that doing something like  trying to subtract two NumberLongs returns a double-precision number, not a NumberLong.  This causes a loss of precision, and this in turn means that hashed shard key values can&apos;t be manipulated in the shell.&lt;/p&gt;

&lt;p&gt;Supporting natural syntax like &lt;tt&gt;NumberLong(&quot;...&quot;) - NumberLong(&quot;...&quot;)&lt;/tt&gt; isn&apos;t necessary, it would suffice to be able to do something like &lt;tt&gt;NumberLong(&quot;...&quot;).subtract(NumberLong(&quot;...&quot;))&lt;/tt&gt; and get back a NumberLong.&lt;/p&gt;</description>
                <environment></environment>
        <key id="141254">SERVER-14217</key>
            <summary>Support NumberLong arithmetic in mongo shell and server JS</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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-server-platform">DO NOT USE - Backlog - Platform Team</assignee>
                                    <reporter username="kevin.pulo@mongodb.com">Kevin Pulo</reporter>
                        <labels>
                            <label>move-sa</label>
                            <label>platforms-re-triaged</label>
                    </labels>
                <created>Tue, 10 Jun 2014 07:35:13 +0000</created>
                <updated>Tue, 10 May 2022 21:25:20 +0000</updated>
                                                                            <component>JavaScript</component>
                    <component>Shell</component>
                                        <votes>3</votes>
                                    <watches>11</watches>
                                                                                                                <comments>
                            <comment id="4539814" author="steven.vannelli" created="Tue, 10 May 2022 21:25:20 +0000"  >&lt;p&gt;Moving this ticket to the Backlog and removing the &quot;Backlog&quot; fixVersion as per our latest policy for using fixVersions. &lt;/p&gt;</comment>
                            <comment id="687239" author="matt.kangas@10gen.com" created="Mon, 11 Aug 2014 19:05:19 +0000"  >&lt;p&gt;As of r2.7.4, potential contributors should start reading here:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r2.7.4/src/mongo/scripting/v8_db.h#L76-L81&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r2.7.4/src/mongo/scripting/v8_db.h#L76-L81&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r2.7.4/src/mongo/scripting/engine_v8.cpp#L748-L755&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r2.7.4/src/mongo/scripting/engine_v8.cpp#L748-L755&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://github.com/mongodb/mongo/blob/r2.7.4/src/mongo/shell/types.js#L312-L319&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/blob/r2.7.4/src/mongo/shell/types.js#L312-L319&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="687230" author="tubededentifrice" created="Mon, 11 Aug 2014 18:54:56 +0000"  >&lt;p&gt;Adding a &quot;BigNumber&quot; library is not a &lt;b&gt;good&lt;/b&gt; option for map-reduce operations, because it requires you to embed the library in the map or reduce methods, so it&apos;s run at every single map or reduce call, causing a big overhead.&lt;br/&gt;
Beside this, those operators are probably already somewhere in MongoDB (as update use them for $inc, for example), just not accessible through the JS interface.&lt;/p&gt;</comment>
                            <comment id="621992" author="kevin.pulo@10gen.com" created="Sun, 15 Jun 2014 14:04:44 +0000"  >&lt;p&gt;I&apos;d be happy with just 64-bit long integer, since that&apos;s all that&apos;s necessary to work with hashed shard keys (the real motivation behind this request).  Plugging in an arbitrary-precision library would certainly be sufficient, and might enable other interesting use cases.  Do any of them have an AGPL compatible license?&lt;/p&gt;</comment>
                            <comment id="621111" author="matt.kangas@10gen.com" created="Sat, 14 Jun 2014 03:52:01 +0000"  >&lt;p&gt;Are you looking for an arbitrary precision math library in the shell? A number of these exist for JavaScript. We probably should not roll our own in any event.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="151647">SERVER-14846</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="24033">SERVER-4141</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="225588">SERVER-19943</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="216464">SERVER-19676</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>5.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Sat, 14 Jun 2014 03:52:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 39 weeks, 1 day 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_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>steven.vannelli@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 39 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-platform</customfieldvalue>
            <customfieldvalue>kevin.pulo@mongodb.com</customfieldvalue>
            <customfieldvalue>matt.kangas</customfieldvalue>
            <customfieldvalue>steven.vannelli@mongodb.com</customfieldvalue>
            <customfieldvalue>tubededentifrice</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrlthr:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>121872</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_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|hsguzb:</customfieldvalue>

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